SA-MP Forums Archive
Empty Slot - GetPlayerWeaponData - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Empty Slot - GetPlayerWeaponData (/showthread.php?tid=147958)



Empty Slot - GetPlayerWeaponData - Beyond - 15.05.2010

I've a n00b question.. but i don't really know so

Let's make this example.

Код:
new weap, ammo;
GetPlayerWeaponData(playerid, 5, weap, ammo);
If "playerid" guy doesn't have any weapon in that slot.. in variable "weap" what returns? 0, -1 or even different ?

Thanks.


Re: Empty Slot - GetPlayerWeaponData - cessil - 15.05.2010

if weap == 0 then its either fists if its slot 0 or no weapon


Re: Empty Slot - GetPlayerWeaponData - Beyond - 15.05.2010

Quote:
Originally Posted by cessil
if weap == 0 then its either fists if its slot 0 or no weapon
So it's 0.

OK Thanks