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)
+--- Thread: GetPlayerWeaponData (
/showthread.php?tid=501631)
GetPlayerWeaponData -
detter - 19.03.2014
i'm using GetPlayerWeaponData for saving player weapons but i found some wired bug (i guess)...
if player has colt(or any other weapon) with some ammo and he shoots and goes offline his stats save as they should but if he did not spent any of his ammo when he goes offline his ammo drops to 0
is there way around it?
Re: GetPlayerWeaponData -
detter - 20.03.2014
*bump
Re: GetPlayerWeaponData -
detter - 21.03.2014
*bump
i found out that same thing happens with GetPlayerAmmo and if you waste your ammo and check for WeaponData, ID of item is 'saved' (it doesn't change ,it should be 0)
soo how can i update and save player weapon and ammo
Re: GetPlayerWeaponData -
BenTaylorUK - 21.03.2014
If the weapon still shows in the slot after they wasted all the ammo, then just have it check if the weapon in that slot actually has ammo with it before saving.
Re: GetPlayerWeaponData -
detter - 21.03.2014
that's the problem ,if player did not waste any of his ammo it will show same stats as like he wasted it all
even if i use SetPlayerAmmo and then GetPlayerAmmo i get same result
edit: i solved problem ,if someone has the same problem i can pm them code.