GetPlayerWeaponData
#1

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.
Reply
#2

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

0 you cant get -1 ammo ^^
Reply
#4

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

Thank you all, this helped me very much.
Reply
#6

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.
Reply
#7

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
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)