View Single Post
  #9  
Old 06-25-2011, 08:52 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by Deas_Voice View Post
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"
Ah, I'll have to remember that! Also I had no idea that the function was completely absent in GS2. I'm thinking /scripthelp hasweapon should be updated to at least tell the user that it's not functional online.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote