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");
}
}