Anti cheat check
#1

Ok i have tried to make an anti speedhack and it works but i want it not to detect if the player is admin level 4 it should not detect the player if he/she is speed hacking but if there level is less than 4 it will detect and send the message to the online admins.

My coding:
PHP код:
public OnPlayerUpdate(playerid)
{
    if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new 
speed GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
        if(
speed 270 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 519 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 553 || speed 300)
        {
            if(!
IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 4)// if im not wrong this is saying if the player is not rcon or lower than level 4
            
{
                new 
string[128];
                
format(stringsizeof(string), "Player %s(ID:%i) might be using speed hacks (%d MPH)",         GetName(playerid),playeridspeed);
                new 
Float:XFloat:YFloat:Z;
                
GetPlayerPos(playeridXYZ);
                
RemovePlayerFromVehicle(playerid);
                
SetPlayerPos(playeridXYZ+5);
                
SendToAdmins(orangestring);
            }
        }
    } 
Reply


Messages In This Thread
Anti cheat check - by 1fret - 25.06.2017, 11:20
Re: Anti cheat check - by Kane - 25.06.2017, 11:22
Re: Anti cheat check - by 1fret - 25.06.2017, 11:31
Re: Anti cheat check - by Kane - 25.06.2017, 11:33
Re: Anti cheat check - by Dayrion - 25.06.2017, 11:43

Forum Jump:


Users browsing this thread: 2 Guest(s)