
03-02-2011, 08:44 PM
|
|
ジ
|
 |
Join Date: Nov 2010
Location: Germany
Posts: 1,015
|
|
Quote:
Originally Posted by cbk1994
Use == instead of = for value checking. A single equal sign is for assigning values for variables.
PHP Code:
//#CLIENTSIDE
function onWeaponFired(){
if(this.on == false){
this.on = true;
player.attr[3] = "bomb.png";
replaceani("idle", "carrystill");
replaceani("walk", "carry");
}else{
this.on = false;
player.attr[3] = "";
replaceani("idle","idle");
replaceani("walk","walk");
}
}
In this case, you could also use
PHP Code:
if (! this.on) {
|
whoops you right :P |
|
|
|