View Single Post
  #2  
Old 05-15-2012, 09:56 PM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by Fysez View Post
I've got the whole Gani part working. Problem is,
Once I equip and use the item,
It doesn't allow me to un-equip?
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
if (
this.on false) {
this.on true;
setani("Gani"null);
replaceani("idle""Gani");
replaceani("walk""Gani2");
this.on true;
}else if (!
this.on){
setani("idle"null);
replaceani("idle""idle");
}

A few things.

if (this.on = false)
should be
if(this.on == false)
= sets values, == checks for equivalency.

Even if that was fixed it still wouldn't work, !this.on is the same thing as this.on == false, so you are checking if the weapon is off in both your if statements.

Also your aren't setting this.on back to false at any point, so once you unequip it once its going think its still on and you won't be able to reequip it. And you aren't resetting your walk gani to walk when you turn it off.
__________________
-Ph8
Reply With Quote