Thread: Hat Weapon
View Single Post
  #6  
Old 08-12-2010, 10:19 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Tip: Create a -Hat system, and have your Hat weapons call one it's functions. That way if you want to add an haton, hatoff animation you don't have change all your Hat weapons.

I.e:

-Hat

PHP Code:
//#CLIENTSIDE

public function changeHat(hatimg) {
  if (
player.attr[1] == hatimg) { 
    
player.attr[1] = "hat.png";  
  } else { 
    
player.attr[1] = hatimg
  }

Hats/Gasmask:

PHP Code:
//#CLIENTSIDE

function onWeaponFired() {
  (@
"-Hat").changeHat("ds-gasmask.png");

__________________
Quote:
Reply With Quote