As Starfire2001 just said, a single equals sign is for assignment, while two are for testing equality.
Styling your code, as you should have done before posting:
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");
}
}
Removing some redundant stuff like "== true" and fixing your assignment (you would have known that if you'd read the tutorial I've linked to you several times now)
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
if (! this.on) {
this.on = true;
setani("Gani", null);
replaceani("idle", "Gani");
replaceani("walk", "Gani2");
} else if (this.on) {
this.on = false;
setani("idle", null);
replaceani("idle", "idle");
replaceani("walk", "walk");
}
}
It should work now. If it doesn't, list the steps you've used to try to debug it.