Thread: carrying
View Single Post
  #4  
Old 03-02-2011, 01:55 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by callimuc View Post
Well you won´t get out of it until you reconnect and the attribute will still be the bomb.png i guess
I think you should do something like:
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");
  }
} 
Just got Trial again so I can´t test it
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) { 
__________________
Reply With Quote