SA-MP Forums Archive
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: GetPlayerWeaponData (/showthread.php?tid=159799)



GetPlayerWeaponData - DeathOnaStick - 14.07.2010

Simple question: What does GetPlayerWeaponData store in WeaponID, if the player held a weapon in it, but it ran out of ammo? Will it still return the ID of the unuseable weapon, that ammo ran out, or just something like 0, or -1? Thanks for replies.


Re: GetPlayerWeaponData - Finn - 14.07.2010

It will still return the ID of the unusable weapon. Of course ammunition of it will be 0 or -1.


Re: GetPlayerWeaponData - Nero_3D - 14.07.2010

0 you cant get -1 ammo ^^


Re: GetPlayerWeaponData - MadeMan - 14.07.2010

pawn Код:
GivePlayerWeapon(playerid, 31, -1);
And then use GetPlayerWeaponData, see what you get.


Re: GetPlayerWeaponData - DeathOnaStick - 14.07.2010

Thank you all, this helped me very much.


Re: GetPlayerWeaponData - nemesis- - 14.07.2010

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
0 you cant get -1 ammo ^^
Give a player 99999999 ammo. GetPlayerWeaponData will return -1 as the ammo count.


Re: GetPlayerWeaponData - Nero_3D - 14.07.2010

Because that ammo is invalid, if I remind correctly it was something about 2^16 (65536) as maximum

Dont blame me for each wrong thing twice, MadeMan corrected me already
This language is to uninteresting that I would bookmark every detail exactly
My answer was based on logic (you cant have -1 ammo)

END


Re: GetPlayerWeaponData - Maggi - 19.07.2010

GetPlayerWeaponData returns invalid data when player uses fast scroll....Any ideas how to fix this native bug