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

health/armour > 100.0 by cheat unreally.
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
pawn Код:
#define IS_NOT_IN_GODMODE_IF_STATEMENT if(playerid == playerid)//Default: N/A
That can be written as:

pawn Код:
#define IS_NOT_IN_GODMODE_IF_STATEMENT
Which entirely removes the "if", but leaves the block statement after it - entirely valid code without the excess check.
Wow, i didn't think of trying that way, i was simply trying to get it to compile, updated, thanks again

It also opens up so many possibilities!

@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.
Reply
#4

If you don't want the players to use some vehicle models just don't add them to the server. No need for an anticheat to do that.
Reply
#5

Quote:
Originally Posted by Frant1kz
Посмотреть сообщение
@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.
I do not know one cheat that do health more 100.0. I know that godmode only freeze player health.
Reply
#6

Looks useful.Good work
Reply
#7

Quote:
Originally Posted by Plovix
Посмотреть сообщение
Looks useful.Good work
Thank you.
Reply
#8

Nice work.! +1 rep
Reply
#9

Hmm i wouldn't really love to use such an anti cheat because some servers requires the cars you removed so i guess the car anti cheat fails as for the weapon system too i guess it fails too cause also some other's need the same weapons
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)