SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 29/08/2014, 04:14 PM   #1
PMH
Huge Clucker
 
Join Date: Jun 2014
Location: Pakistan
Posts: 216
Reputation: 24
Default PMH's Anti Weapon Hack!!! + Ammo hack

So guys, I made a new Anti weapon hack which works for sure!
It works for all weapons! (Parachute is excluded)

First of all, I used PVars so that you can use the same anti cheat with many filterscripts!

How to do:
First go to each filterscript and add this:

pawn Code:
stock ResetWeapons(playerid)
{

    SetPVarInt(playerid, "Brass Knuckles", 0);
    SetPVarInt(playerid, "Golf Club", 0);
    SetPVarInt(playerid, "Nite Stick", 0);
    SetPVarInt(playerid, "Knife", 0);
    SetPVarInt(playerid, "Baseball Bat", 0);
    SetPVarInt(playerid, "Shovel", 0);
    SetPVarInt(playerid, "Pool Cue", 0);
    SetPVarInt(playerid, "Katana", 0);
    SetPVarInt(playerid, "Chainsaw", 0);
    SetPVarInt(playerid, "Heat Seaker", 0);
    SetPVarInt(playerid, "Dildo", 0);
    SetPVarInt(playerid, "Vibrator", 0);
    SetPVarInt(playerid, "Flowers", 0);
    SetPVarInt(playerid, "Cane", 0);
    SetPVarInt(playerid, "Teargas", 0);
    SetPVarInt(playerid, "Bomb", 0);
    SetPVarInt(playerid, "HS Rocket", 0);
    SetPVarInt(playerid, "Flamethrower", 0);
    SetPVarInt(playerid, "Satchel Explosives", 0);
    SetPVarInt(playerid, "Spray Can", 0);
    SetPVarInt(playerid, "Fire Extinguisher", 0);
    SetPVarInt(playerid, "Camera", 0);
    SetPVarInt(playerid, "Night Vis Goggles", 0);
    SetPVarInt(playerid, "Thermal Goggles", 0);
    SetPVarInt(playerid, "Grenade", 0);
    SetPVarInt(playerid, "Molotov Cocktail", 0);
    SetPVarInt(playerid, "Colt 45", 0);
    SetPVarInt(playerid, "Silenced Pistol", 0);
    SetPVarInt(playerid, "Desert Eagle", 0);
    SetPVarInt(playerid, "Shotgun", 0);
    SetPVarInt(playerid, "Sawn-off Shotgun", 0);
    SetPVarInt(playerid, "Combat Shotgun", 0);
    SetPVarInt(playerid, "UZI", 0);
    SetPVarInt(playerid, "MP5", 0);
    SetPVarInt(playerid, "AK47", 0);
    SetPVarInt(playerid, "M4", 0);
    SetPVarInt(playerid, "Tec9", 0);
    SetPVarInt(playerid, "Rifle", 0);
    SetPVarInt(playerid, "Sniper Rifle", 0);
    SetPVarInt(playerid, "Rocket Launcher", 0);
    SetPVarInt(playerid, "Minigun", 0);
    ResetPlayerWeapons(playerid);
}

stock GivePlayerServerWeapon(playerid, weapid, ammo)
{
    new gunname[32];
    GivePlayerWeapon(playerid, weapid, ammo);
    GetWeaponName(weapid, gunname, sizeof(gunname));
    SetPVarInt(playerid, gunname, GetPVarInt(playerid, gunname) +ammo);
}

Then press Ctrl + h and replace "ResetPlayerWeapons" and "GivePlayerWeapon" with "ResetWeapons" and "GivePlayerServerWeapon"!

Now add this to your gamemode:
pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    new weapname[32];
    GetWeaponName(weaponid, weapname, sizeof(weapname));
    if(GetPVarInt(playerid, weapname) < 1) return SCM(playerid, -1, "Hack detected");
    SetPVarInt(playerid, weapname, GetPVarInt(playerid, weapname) -1);
    return 1;
}

if u have this public already in ur gm then just add the fuction below your public!

That's it! when someone hacks, a msg will be sent, "Hello hacker" however u can change it so that it autobans the player!

Just change this line:
pawn Code:
if(GetPVarInt(playerid, weapname) < 1 ) return SCM(playerid, -1, "Hack detected");
to
pawn Code:
if(GetPVarInt(playerid, weapname) < 1) return Ban(playerid);


+rep if you use it, thank you!!

for lazy people, here's the include:
http://www.solidfiles.com/d/ae9cf3e4a6/antihack.inc
download it, put it in ur pawno/include folder and just type #include <antihack> on top of ur script!
and add OnPLayerWeaponsShot fuction to ur gm thats all!

if any weapon does gets detected, post here i'll fix it :P
__________________

Last edited by PMH; 09/09/2014 at 02:16 PM.
PMH is offline   Reply With Quote
Old 08/09/2014, 12:32 AM   #2
Threshold
High-roller
 
Threshold's Avatar
 
Join Date: Nov 2012
Location: Australia
Posts: 3,102
Reputation: 522
Default Re: PMH's Anti Weapon Hack!!! + Ammo hack

Horrible.
__________________

Kar's Cops and Robbers 2019
Threshold is offline   Reply With Quote
Old 08/09/2014, 03:09 AM   #3
Anthony_Vernon
Little Clucker
 
Anthony_Vernon's Avatar
 
Join Date: Jan 2011
Location: California, USA
Posts: 20
Reputation: 4
Default Re: PMH's Anti Weapon Hack!!! + Ammo hack

This looks more like a failed tutorial rather a Fs.
__________________
Anthony_Vernon is offline   Reply With Quote
Old 08/09/2014, 11:54 AM   #4
PMH
Huge Clucker
 
Join Date: Jun 2014
Location: Pakistan
Posts: 216
Reputation: 24
Default Re: PMH's Anti Weapon Hack!!! + Ammo hack

Quote:
Originally Posted by Anthony_Vernon View Post
This looks more like a failed tutorial rather a Fs.
well it works and that's enough :P
__________________
PMH is offline   Reply With Quote
Old 25/01/2015, 12:12 PM   #5
MBilal
Gangsta
 
MBilal's Avatar
 
Join Date: May 2013
Posts: 811
Reputation: 57
Default Re: PMH's Anti Weapon Hack!!! + Ammo hack

its not Tutorial but its Filterscript and working ..Awesome
MBilal is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] DeatheR's Anti-Ammo Hack deather Filterscripts 22 26/01/2014 11:48 AM
Anti Ammo hack problem _Khaled_ Scripting Help 3 03/07/2013 02:26 AM


All times are GMT. The time now is 01:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.