View Single Post
  #9  
Old 07-07-2011, 09:19 AM
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 Astram View Post
You can also like add some funk to the hat adding script.
PHP Code:
//#CLIENTSIDE
function onWeaponFired()
  {
  
this.hat = "hat1.png";
  if (
clientr.lasthat != this.hat)
    {
    
player.attr[1] = this.hat;
    
clientr.lasthat = player.attr[1];
    
setAni("Equiphat",NULL);
    }
  else
    {
    
setAni("Removehat",NULL);
    
player.attr[1] = "no-hat.png";
    
clientr.lasthat = player.attr[1];
    }
  } 
In the gani make the "hat" image ATTR1
and
make this.hat in a script be the hats imagename.
If you want it as a class for easy use just ask me
That script could be rewritten as:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
this.hat = "hat1.png";
  
  if (
player.attr[1] == this.hat) {
    
player.attr[1] = "";
    
setAni("removehat", null);
  } else {
    
player.attr[1] = this.hat;
    
setAni("equiphat", null);
  }
} 
Keep in mind you can't change clientr variables on clientside. Also, work on your styling, it's really important in scripting.

Quote:
Originally Posted by Conqueror View Post
*runs*
u ez
__________________
Reply With Quote