SA-MP Forums Archive
AIRBREAK ANTI-CHEAT - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AIRBREAK ANTI-CHEAT (/showthread.php?tid=580070)



AIRBREAK ANTI-CHEAT - sscarface - 02.07.2015

--------------


Re: AIRBREAK ANTI-CHEAT - Youssef221 - 02.07.2015

I use this script for anti air breaking:

pawn Код:
if(GetPlayerAnimationIndex(playerid) == 958 || GetPlayerAnimationIndex(playerid) == 959)
    {
    if(GetPlayerWeapon(playerid) != 46)
    {
    new antimsg[128], hackerr[MAX_PLAYER_NAME];
    GetPlayerName(playerid, hackerr, MAX_PLAYER_NAME);
    format(antimsg, sizeof(antimsg), "%s (%d) Has Been Banned By The Anti-Cheat (AC) | Reason: Airbreak Hacks.", hackerr, playerid);
    SendClientMessageToAll(0x00FFFFFF, antimsg);
    SendClientMessage(playerid, 0xFF0000AA, "You Have Been Banned By The Anti-Cheat (AC) | Reason: Airbreak Hacks.");
    Info[playerid][Banned] = 1;
    SendClientMessage(playerid, 0xFFC400AA, "If You Feel That You Are Wrongly Banned Feel Free To Post An Appeal In Our Forums: Yourforumhere");
    BanEx(playerid, "Airbreak Hacks");
    }
    }



Re: AIRBREAK ANTI-CHEAT - Tamer - 02.07.2015

An airbreaking player will mostly report the normal onfoot speed, checking for speed is useless.


Re: AIRBREAK ANTI-CHEAT - sscarface - 02.07.2015

Quote:
Originally Posted by Youssef221
Посмотреть сообщение
I use this script for anti air breaking:

pawn Код:
if(GetPlayerAnimationIndex(playerid) == 958 || GetPlayerAnimationIndex(playerid) == 959)
    {
    if(GetPlayerWeapon(playerid) != 46)
    {
    new antimsg[128], hackerr[MAX_PLAYER_NAME];
    GetPlayerName(playerid, hackerr, MAX_PLAYER_NAME);
    format(antimsg, sizeof(antimsg), "%s (%d) Has Been Banned By The Anti-Cheat (AC) | Reason: Airbreak Hacks.", hackerr, playerid);
    SendClientMessageToAll(0x00FFFFFF, antimsg);
    SendClientMessage(playerid, 0xFF0000AA, "You Have Been Banned By The Anti-Cheat (AC) | Reason: Airbreak Hacks.");
    Info[playerid][Banned] = 1;
    SendClientMessage(playerid, 0xFFC400AA, "If You Feel That You Are Wrongly Banned Feel Free To Post An Appeal In Our Forums: Yourforumhere");
    BanEx(playerid, "Airbreak Hacks");
    }
    }
Well, It doesn't kick me when im airbreaking. Anyways, I fixed mine. I have to decreased MAX_FOOT_SPEED.
But I want to know how does this work ^^ you have posted?


Re: AIRBREAK ANTI-CHEAT - sscarface - 02.07.2015

Well, It's shit. Anyone knows something best instead of getting player foot speed.?


Re: AIRBREAK ANTI-CHEAT - Youssef221 - 02.07.2015

Quote:
Originally Posted by sscarface
Посмотреть сообщение
Well, It doesn't kick me when im airbreaking. Anyways, I fixed mine. I have to decreased MAX_FOOT_SPEED.
But I want to know how does this work ^^ you have posted?
Firstly, it checks if the player's animation is parachute animation, because most air breaks hacks uses parachute animation, secondly, I check if the player doesn't have a parachute, if so, then the player is air breaking:

I changed it so it makes the player being kicked not banned:

pawn Код:
if(GetPlayerAnimationIndex(playerid) == 958 || GetPlayerAnimationIndex(playerid) == 959)
    {
    if(GetPlayerWeapon(playerid) != 46)
    {
    new antimsg[128], hackerr[MAX_PLAYER_NAME];
    GetPlayerName(playerid, hackerr, MAX_PLAYER_NAME);
    format(antimsg, sizeof(antimsg), "%s (%d) Has Been Kicked By The Anti-Cheat (AC) | Reason: Airbreak Hacks.", hackerr, playerid);
    SendClientMessageToAll(0x00FFFFFF, antimsg);
    SendClientMessage(playerid, 0xFF0000AA, "You Have Been Kicked By The Anti-Cheat (AC) | Reason: Airbreak Hacks.");
    Info[playerid][Banned] = 1; // NOTE: Delete this and put your own variable here
    Kick(playerid);
    }
    }



Re: AIRBREAK ANTI-CHEAT - sscarface - 02.07.2015

It doesn't detect player if player is airbreaking. I just tested it now.

PHP код:
for(new iMAX_PLAYERSi++) // Start the loop
    
{
      
//if(pData[i][pAdmin] < 1)
      //{
            
if(GetPlayerSurfingVehicleID(i) == INVALID_VEHICLE_ID && GetPlayerState(i) == PLAYER_STATE_ONFOOT)
            {
                if(
GetPlayerAnimationIndex(i) == 958 || GetPlayerAnimationIndex(i) == 959)
                {
                if(
GetPlayerWeapon(i) != 46)
                {
                    new 
string[126];
                    
format(string,sizeof(string),"SERVER ANTI-CHEAT: %s (%d) CHEATING (AIRBREAK CHEATS)."pnameID);
                    
SendMessageToAdmins(RED,string);
                   
                    return 
1;
                }
                }
            }
       
//}