to clarify what Crow and Thor means; hasWeapon is GS1 and does not exist in GS2.
however, you shouldn't have to loop thought the player's weapons to find if you have a weapon or not. findWeapon() should do the trick.
findWeapon(str weaponname) - returns str (object?)
if you have the weapon, or 0 if you don't have it.
with this, you could make a hasWeapon(weap) function by checking if findWeapon() is equal to 0, if that is so, return false, if not, return true. this works on both client and serverside.
e; no pre-scripted for you

, should be simple enuf with my "description"