pawn Код:
public antiCheat()
{
foreach(Player, i)
{
if(playerVariables[i][pStatus] >= 1)
{
if(playerVariables[i][pAdminLevel] < 1 || playerVariables[i][pHelper] < 1)
{
GetPlayerName(i,szPlayerName, MAX_PLAYER_NAME);
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK && playerVariables[i][pJetpack] == 0)
{
scriptBan(i, "Cheats (Jetpack)");
}
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new speed=GetPlayerSpeed(i,0);
if(speed>290)
{
scriptBan(i,"Cheats (Speed Hack)");
}
}
else if(!IsPlayerInAnyVehicle(i))
{
new speed=GetPlayerSpeed(i,0);
if(speed>300)
{
scriptBan(i,"Cheats (Speed Hack)");
}
}
}
}
}
return 1;
}
stock scriptBan(playerid, reason[])
{
new aString[240];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(aString, sizeof(aString), "Kick: %s has been kicked By AntiCheat, reason: %s", szPlayerName, reason);
SendClientMessageToAll(COLOR_LIGHTRED, aString);
mysql_real_escape_string(aString, aString);
adminLog(aString);
Kick(playerid);
return 1;
}