[Include] SA:MP Buster - Plug & Play Anti-Cheat
#1

SA:MP Buster - Plug & Play Anti-Cheat
Version: 1.0

Introduction:

SA:MP Buster is intended to be a "Plug & Play" style script, so i though using the prefix [Include] was appropriate for this release. Simply paste the anti-cheat into ANY gamemode script, make a few adjustments and BANG, you have a fully functional anti-cheat!

Features:

- Completely "Plug & Play" (Just a couple of steps!)
- SA:MP Buster currently supports (5) detection's!
- Turn on/off any detection!
- Define Admin passes!
- Define Godmode passes!


Current Detection's:

1. Health Hack
2. Armour Hack
3. Weapon Hack
4. Vehicle Hack
5. Jetpack Hack


Source(Download):

pawn Код:
//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;
}
Installation:

Step 1: Make sure you have YSI installed as the script use's "y_timers".

Step 2: Copy/paste the source code at the bottom of your script(Not in a callback)

Step 3: Modify the configuration, and your DONE!


Credits:

Frant1kz - SA:MP Buster
****** - y_timers



Please feel free to post any questions/suggestions here, i will be more then happy to develop future versions to cater to your suggestions.


Frant1kz
Reply


Messages In This Thread
SA:MP Buster - Plug & Play Anti-Cheat - by Frant1kz - 27.11.2012, 04:44
Re: SA:MP Buster - Plug & Play Anti-Cheat - by DrSlett - 27.11.2012, 05:35
Re: SA:MP Buster - Plug & Play Anti-Cheat - by Frant1kz - 27.11.2012, 23:51
Re: SA:MP Buster - Plug & Play Anti-Cheat - by im - 29.11.2012, 00:06
Re: SA:MP Buster - Plug & Play Anti-Cheat - by DrSlett - 29.11.2012, 01:47
Re: SA:MP Buster - Plug & Play Anti-Cheat - by Plovix - 02.12.2012, 14:32
Re: SA:MP Buster - Plug & Play Anti-Cheat - by Frant1kz - 06.12.2012, 11:15
Re: SA:MP Buster - Plug & Play Anti-Cheat - by stefanel9944 - 13.12.2012, 18:17
Re: SA:MP Buster - Plug & Play Anti-Cheat - by [GF]Logic - 13.12.2012, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)