
08-12-2010, 11:24 AM
|
|
Extrinsical Anomaly
|
 |
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
|
|
Quote:
Originally Posted by iSlayer
Hi all, I'm trying to make a simple NPC when player fires it, it checks if the player has tht hat on, if he does it sets the hat to hat.png, if not it sets the players hat to the hat filename, someone please help me, this is what ive got so far
PHP Code:
//#CLIENTSIDE
function onWeaponFired() { { if (player.attr[1] = "ds-gasmask.png") player.attr[1] = "hat.png"; } else { player.attr[1] = "ds-gasmask.png"; } }
Thanks!
|
Your brackets are off.
PHP Code:
//#CLIENTSIDE function onWeaponFired() { if (player.attr[1] = "ds-gasmask.png") { player.attr[1] = "hat.png"; } else if (player.attr[1] = "hat.png") { player.attr[1] = "ds-gasmask.png'"; }
I think that'll work. |
__________________
Careful, thoughts and opinions here scare people.
|
|
|
|