View Single Post
  #3  
Old 05-15-2012, 10:07 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by Starfire2001 View Post
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.
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
if (
this.on == false) {
this.on == true;
setani("Gani"null);
replaceani("idle""Gani");
replaceani("walk""Gani2");


}else if (
this.on == true){
this.on == false;
setani("idle"null);
replaceani("idle""idle");
replaceani("walk""walk");
}

Doesn't necessarily work either
Reply With Quote