SA-MP Forums Archive
GetPlayerWeaponState - False Readings - 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: GetPlayerWeaponState - False Readings (/showthread.php?tid=446339)



GetPlayerWeaponState - False Readings - Kyle - 25.06.2013

Hello,

GetPlayerWeaponState seems to be giving off false readings.

I give a player a weapon (Desert) with atleast 100+ ammo and the weapon state returns NO_BULLETS.

Which is causing the array to be reset to 0 (weapon gone, set to 0). So if someone spawns the weapon = ban.
But it is coming up as NO_BULLETS causing bad anticheat readings.

Code: Removed - Don't want code stealers.

Anyone have an idea?

Regards


Re: GetPlayerWeaponState - False Readings - DaTa[X] - 25.06.2013

save the ammo in variable
and the GetPlayerWeaponState function should return 2 things the weapon id and the ammo


Re: GetPlayerWeaponState - False Readings - Kyle - 25.06.2013

Quote:
Originally Posted by DaTa[X]
Посмотреть сообщение
save the ammo in variable
and the GetPlayerWeaponState function should return 2 things the weapon id and the ammo
No, you're talking about weapon DATA not STATE.

Anyway OP: I fixed it, I checked their ammo, if 0 = clear variable...