[FilterScript] PMH's Anti Weapon Hack!!! + Ammo hack
#1

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
Reply
#2

Horrible.
Reply
#3

This looks more like a failed tutorial rather a Fs.
Reply
#4

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
Reply
#5

its not Tutorial but its Filterscript and working ..Awesome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)