25.02.2018, 12:40
(
Последний раз редактировалось StrikerZ; 19.03.2018 в 09:44.
)
Anti Weapons And Ammo Hack
Код:
This include is perfectly working and it's even active in my server since days, I haven't received any false detection from the include till now. If you find any bug, report it here.
This include is meant to detect player's using weapons hack/ammo hack. This include also excludes the situations such as using the Detonator (Thanks to RogueDrifter for reminding me about the detonator), jumping out of a plane and receiving parachute, and also contains the check against the case when sometimes while entering or exiting a vehicle the server may say they have a weapon which they do not have.
Mechanism:
When players use weapon/ammo hack, they usually do it without calling the Weapon/Ammo functions so we can easily record the player's data by using hooked functions.
Usage:
One callback is provided for this include to give users the full control of this include.
THIS INCLUDE MUST BE INCLUDED IN ALL FILTERSCRIPTS!
Код:
Only one function: - OnPlayerWeaponsHack(playerid, weaponid, ammo, type) Types: 1 - Weapons Hack 2 - Ammo Hack 3 - Different Weapon In Another Slot (I highly recommend to timeout player for this type as this can also be caused for being desycned too) 4 - Ammo freeze aka no reload aka infinite ammo
Changelog:
Код:
V1.1 - Fixed the case when player sometimes shooting weapon gets detected as a hacker. - Fixed the case when guns like SMG when used trigger ammo hack. - Improved the code. - Fixed the false detection when SetSpawnInfo is used. V1.2 - Added type #4, anti ammo freeze aka infinite ammo aka no reload. V1.3 - Fixed the out of bounds error. - Optimized the code.
Thanks once again to RogueDrifter's immunity trick, and I've tested it several times for days, using all the weapon cheats, the script functions to manipulate the weapon/ammo data of the player, I have tried to hook nearly all the weapon/ammo functions of the script so that there may not be any false detection and the variables stay up to date. For the type 3, I recommend using the tip I've listed above. Also it has support for all scripts so you need to include it in all your filterscripts to avoid false detections.
Download:
GitHub
Pastebin
Attachment
I HIGHLY RECOMMEND ROGUE'S FILTER LAGGERS INCLUDE TO AVOID FALSE DETECTIONS BECAUSE OF LAGGERS. CLICK ME TO GO TO THE INCLUDE'S THREAD.