Quote:
|
Originally Posted by projectigi
hrm i think selectedweapon is the id of the current weapon
you could loop through the player.weapons array and use weapon.name to get the name
like
NPC Code:
function onCreated(){
for(i=0;i<=player.weapons.size();i++){
if(player.weapons[i]=="weaponname")
selectedweapon=i;
}
}
|
Okay, you just did the same exact thing I did. Selectedweapon is the current weapon, its writable.