View Single Post
  #11  
Old 02-13-2005, 06:11 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
If you can't find a substitute for hasweapon(), you could always script your own.

This should work:
PHP Code:
function PlayerHasWeapon(weaponname) {
  for(
wweapons) {
    if(
w.name == weaponname) {
      return 
true;
    }
  }

  return 
false;

That might not be the best way to do it, but it will work. (I'm not sure, if you can use something like weapons.name.index(weaponname) or not)
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote