SA-MP Forums Archive
[FilterScript] Anti-AmmoHack v1.0 by iRage - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti-AmmoHack v1.0 by iRage (/showthread.php?tid=420386)



Anti-AmmoHack v1.0 by iRage - iRage - 04.03.2013

Introduction
It's a simple filterscript that detects if any player is using infinite ammo hacks and warns everybody online about it.

How does it work?
Basically, it uses OnPlayerKeyStateChange to save the amount of bullets a player has in the weapon he's holding before it gets used, then it executes a 600ms timer that checks if the bullets/item amount was decremented or not.

Files Needed
You will need sscanf and zcmd for this to compile successfully.


Download
Pastebin



Re: Anti-AmmoHack v1.0 by iRage - iFear - 05.03.2013

Seems Nice.
Good Work


Re: Anti-AmmoHack v1.0 by iRage - Gangster-rocks - 18.03.2013

awesome.


Re: Anti-AmmoHack v1.0 by iRage - Mr.GeEk - 18.03.2013

looks nice!


Re: Anti-AmmoHack v1.0 by iRage - dakata994 - 18.03.2013

Good job man!


Re: Anti-AmmoHack v1.0 by iRage - Emily_Miku - 23.06.2013

nice anti ammo hack fs


Re: Anti-AmmoHack v1.0 by iRage - dEcooR - 23.06.2013

will use it


Re: Anti-AmmoHack v1.0 by iRage - xser - 23.06.2013

I checked it out, good job


Respuesta: Anti-AmmoHack v1.0 by iRage - Gryphus One - 24.06.2013

There are situations in which this script can lead to false detections: for example if you have a weapon like Desert Eagle or M4 and you stand next to a wall, you won't shoot. Or if you stand next to another player, you will punch him instead of shooting him. Or if you have sniper rifle or rocket launcher and you don't press right mouse button, you won't shoot either.

Apart from that, I have noticed that in OnPlayerKeyStateChange you use a string to store the name of the weapon with GetWeaponName, but then you don't use that string anywhere. Why?


Re: Anti-AmmoHack v1.0 by iRage - iRage - 25.06.2013

This script might be outdated, it was one of my first codes since the comeback I made to SA-MP scripting.