View Single Post
  #3  
Old 04-09-2011, 05:56 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
This is a job better done by using ganis.

You can simply making a copy of walk, and idle. I.e: server_stealth-idle, server_stealth-walk.

Have this placed at the bottom of the ganis:

PHP Code:
SCRIPT
function onPlayerEnters() {
  if (
clientr.staff) {  // You will need to alter Control-NPC/Login
    
player.alpha 0.5// Scripts to set a flag if they're staff.
  
} else {
    
player.alpha 0;
  }
}
SCRIPTEND 
then you can simply keep the weapon to your own. I.e:

-Staff/Stealth
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.stealthed false;


function 
ChatBar.onAction() {
  if (
ChatBar.text == "/stealth") {
    
setStealth();
    
ChatBar.text "";
  }
}

function 
setStealth() {
  
this.stealthed = !this.stealthed;
  if (
this.stealthed) {
    
replaceani("idle""stealth-idle");
    
replaceani("walk""stealth-walk");
  } else {
    
replaceani("idle""idle");
    
replaceani("walk""walk");
  }

__________________
Quote:
Reply With Quote