Thread: carrying
View Single Post
  #5  
Old 03-02-2011, 08:44 PM
callimuc callimuc is offline
ジ
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by cbk1994 View Post
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
Reply With Quote