Quote:
Originally Posted by oo_jazz_oo
player.selectedweapon is the index of the selected weapon in the players weapon aray.
PHP Code:
if (player.selectedweapon == player.weapons.index(findweapon("Name")))
|
Should be:
PHP Code:
if (player.weapon == this) { // weapon is currently selected
For selecting a weapon:
PHP Code:
player.selectedWeapon = player.weapons[player.weapons.index(findWeapon("Weapon"))].id; // select a weapon by name
Not sure if there is a better way to do the second, but yours probably won't work since player.weapons is an array of weapon objects.