//Configuration - Starts...
#define IS_NOT_ADMIN_IF_STATEMENT if(!IsPlayerAdmin(playerid))//Default: RCON Admin
#define IS_NOT_IN_GODMODE_IF_STATEMENT //Default: N/A
#define TURN_ON_HEALTH_HACK//Comment this line out if you wish to TURN OFF health hack detection.
#define TURN_ON_ARMOUR_HACK//Comment this line out if you wish to TURN OFF armour hack detection.
#define TURN_ON_WEAPON_HACK//Comment this line out if you wish to TURN OFF weapon hack detection.
#define TURN_ON_VEHICLE_HACK//Comment this line out if you wish to TURN OFF vehicle hack detection.
#define TURN_ON_JETPACK_HACK//Comment this line out if you wish to TURN OFF jetpack hack detection.
new samp_buster_banned_weapons[] =//Modify banned weapons here
{
35,//Rocket Launcher
36,//HS Rocket Launcher
37,//Flamethrower
38,//Minigun
44,//Nightvision Goggles
45//Thermal Goggles (Note: The last one must be missing the "," symbol)
};
new samp_buster_banned_vehicles[] =//Modify banned vehicles here (MODEL ID ONLY!)
{
520,//Hydra
425,//Hunter
447,//Seasparrow
432//Rhino (Note: The last one must be missing the "," symbol)
};
//Configuration - Ends...
ptask samp_buster_anticheat[1000](playerid)
{
//SA:MP Buster - Data
new Float:health, Float:armour, string[128], name[24];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armour);
//SA:MP Buster - Anti-Cheat
IS_NOT_ADMIN_IF_STATEMENT//Admin pass
{
#if defined TURN_ON_HEALTH_HACK
IS_NOT_IN_GODMODE_IF_STATEMENT//Godmode pass
{
//Anti-Health
if(health > 100.0)
{
format(string, sizeof(string), "SAMP-BUSTER: %s (%d) has been banned from the server for: Health Hacks", name, playerid);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(playerid, "[SAMP-BUSTER] Player banned for: Health Hacks");
return 1;
}
}
#endif
#if defined TURN_ON_ARMOUR_HACK
//Anti-Armour
if(armour > 100.0)
{
format(string, sizeof(string), "SAMP-BUSTER: %s (%d) has been banned from the server for: Armour Hacks", name, playerid);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(playerid, "[SAMP-BUSTER] Player banned for: Armour Hacks");
return 1;
}
#endif
#if defined TURN_ON_WEAPON_HACK
//Anti-Weapon
for(new w; w < sizeof(samp_buster_banned_weapons); w++)
{
if(GetPlayerWeapon(playerid) == samp_buster_banned_weapons[w])
{
format(string, sizeof(string), "SAMP-BUSTER: %s (%d) has been banned from the server for: Weapon Hacks", name, playerid);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(playerid, "[SAMP-BUSTER] Player banned for: Weapon Hacks");
return 1;
}
}
#endif
#if defined TURN_ON_VEHICLE_HACK
//Anti-Vehicle
for(new v; v < sizeof(samp_buster_banned_vehicles); v++)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == samp_buster_banned_vehicles[v])
{
format(string, sizeof(string), "SAMP-BUSTER: %s (%d) has been banned from the server for: Vehicle Hacks", name, playerid);
SendClientMessageToAll(0xFF0000FF, string);
DestroyVehicle(GetPlayerVehicleID(playerid));
BanEx(playerid, "[SAMP-BUSTER] Player banned for: Vehicle Hacks");
return 1;
}
}
#endif
#if defined TURN_ON_JETPACK_HACK
//Anti-Jetpack
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
format(string, sizeof(string), "SAMP-BUSTER: %s (%d) has been banned from the server for: Jetpack Hacks", name, playerid);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(playerid, "[SAMP-BUSTER] Player banned for: Jetpack Hacks");
return 1;
}
#endif
return 1;
}
return 1;
}
pawn Код:
pawn Код:
|
@DrSlett
Godmode is 9999, why not check anything above 100 to easily detect it? There shouldn't be a way to get your health to exceed 100%, otherwise your adding to there health somewhere and it is a bug. |