Quote:
Originally Posted by Fulg0reSama
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.
|
Not quite what he wanted though, and your equal signs are off

This should do:
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
if (player.attr[1] == "ds-gasmask.png") {
player.attr[1] = "hat.png";
} else {
player.attr[1] = "ds-gasmask.png'";
}
}
Remember: When comparing stuff, you need two equal signs.