Код:
ptask anticheat[128](playerid)
{
if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid)) return 1;
{
if(GetPlayerState(playerid) == PLAYER_STATE_NONE) return 1;
{
//Anti-Jetpack Cheat
new string[128];
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
format(string, sizeof(string), "SGDM has banned %s [%d] from SGDM - Reason: Jetpack detected", pName(playerid), playerid);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessageToAll(COLOR_WHITE, "SGDM: OWNED!");
PlayerInfo[playerid][pBanned] = 0;
GameTextForPlayer(playerid, "~r~Banned", 5000, 5);
SendClientMessage(playerid, COLOR_RED, "You have been banned from SGDM. You were banned by SGDM.(SGDM BOT)");
SendClientMessage(playerid, COLOR_ORANGE, "If you think this ban is unfair post an appeal at www.SOON.net");
BanEx(playerid, "Jetpack Detected");
return 1;
}
/*//Anti Money Cheat
if(GetPlayerCash(playerid) != GetPlayerCash(playerid))
{
ResetServerCash(playerid);
UpdateServerCash(playerid, GetPlayerCash(playerid));
}*/
new Float:hp;
GetPlayerHealth(playerid, hp);
//Anti Health/God Cheat
if(hp > 101.0)
{
format(string, sizeof(string), "SGDM has banned %s [%d] from SGDM - Reason: Health/God hacks detected", pName(playerid), playerid);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessageToAll(COLOR_WHITE, "SGDM: OWNED!");
PlayerInfo[playerid][pBanned] = 0;
GameTextForPlayer(playerid, "~r~Banned", 5000, 5);
SendClientMessage(playerid, COLOR_RED, "You have been banned from SGDM. You were banned by SGDM.(SGDM BOT)");
SendClientMessage(playerid, COLOR_ORANGE, "If you think this ban is unfair post an appeal at www.SOON.net");
BanEx(playerid, "Health/God Hacks Detected");
return 1;
}
//Anti Weapon Cheat
for(new w; w < sizeof(BannableWeapons); w++)
{
if(GetPlayerWeapon(playerid) == BannableWeapons[w])
{
format(string, sizeof(string), "SGDM has banned %s [%d] from SGDM - Reason: Weapon hacks detected", pName(playerid), playerid);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessageToAll(COLOR_WHITE, "SGDM: OWNED!");
PlayerInfo[playerid][pBanned] = 0;
GameTextForPlayer(playerid, "~r~Banned", 5000, 5);
SendClientMessage(playerid, COLOR_RED, "You have been banned from SGDM. You were banned by SGDM.(SGDM BOT)");
SendClientMessage(playerid, COLOR_ORANGE, "If you think this ban is unfair post an appeal at www.SOON.net");
BanEx(playerid, "Weapon Hacks Detected");
return 1;
}
}
//Auto Ping Kicker
if(GetPlayerPing(playerid) >= MAX_PING)
{
format(string, sizeof(string), "SGDM: %s reduce your ping then relog, its too high!", pName(playerid));
SendClientMessageToAll(COLOR_WHITE, string);
format(string, sizeof(string), "SGDM has kicked %s [%d] from SGDM - Reason: Ping reached %d", pName(playerid), playerid, MAX_PING);
SendClientMessageToAll(COLOR_RED, string);
GameTextForPlayer(playerid, "~r~Kicked", 5000, 5);
SendClientMessage(playerid, COLOR_RED, "You have been kicked from SGDM. You were kicked by SGDM.(SGDM BOT)");
SendClientMessage(playerid, COLOR_ORANGE, "If you think this kick is unfair complain at www.Soon.net");
Kick(playerid);
return 1;
}
}
}
return 1;
}