Quote:
Originally posted by emortylone
NPC Code:
if (created)
{ toweapons *Sword-Only;
this.weap=selectedweapon;
timeout=0.25;
}
if (timeout)
{ if (!selectedweapon=this.weap)
{ selectedweapon=this.weap;}
timeout=0.25;
}
|
I don't think that would work as good as the example I posted earlier because the weapon's index would change if a weapon whose index is lower gets deleted.
Also one reason why to have the sword disabled is so you can have a server whose primary weapon is not a sword. Like for instance it could be a regular pistol or socom.