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



onplayershoot - Glad2BeHere - 25.10.2012

is there a way to detect if the player shoot and see if his ammo went dont i trying to create custom anti cheat


Re: onplayershoot - Catalyst- - 25.10.2012

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage


Re: onplayershoot - Brandlax - 25.10.2012

Add this to OnPlayerDeath:

Quote:

if(GetPlayerWeapon(killerid) == 38 ) Ban(killerid); //set the id to the weapon which your server doesn't allow

That's actually the code of anti cheating of weapon hack, not ammo hack..

For ammo hack what you can do is save the player weapon data for when he spawned and check it again after he killed someone..if the ammo is still the same then that means he is using ammo hack.