new BugAttempt[MAX_PLAYERS];
CMD:bugattempt(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] != 0) {
if(BugAttempt[playerid] == 0) {
BugAttempt[playerid] = 1;
SendClientMessageEx(playerid, -1, "Ban da bat anti bug attempt thanh cong!");
}
else {
BugAttempt[playerid] = 0;
SendClientMessageEx(playerid, -1, "Ban da tat anti bug attempt thanh cong!");
}
}else SendClientMessageEx(playerid, -1, "Ban khong the su dung lenh nay!");
return 1;
}
public OnPlayerBugAttempt(playerid, bugcode)
{
if(gPlayerLogged{playerid} != 0) {
if(GetPVarInt(playerid, "spam8") == 0) {
SetTimerEx("spam7", 5000, 0, "d", playerid);
SetPVarInt( playerid, "spam8", 1);
new cheatname[1280];
switch(bugcode) {
case 0: cheatname = "AFK Ghost";
case 2: cheatname = "Fake Spawn";
case 1: cheatname = "NPC spoof";
case 3: cheatname = "Fake connect";
case 4: cheatname = "CJ Run";
}
if(bugcode == 0 || bugcode == 3) {
if(PlayerInfo[playerid][pAdmin] == 0) {
new string[256];
format(string, sizeof(string), "AdmCmd: %s da bi kick boi System, Ly do: AFK-Ghost", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_LIGHTRED, string);
KickWithMessage(playerid, "Ban da bi kick, ly do: AFK-Ghost");
}
}
}
}
return 1;
}
forward spam7(playerid);
public spam7(playerid)
{
DeletePVar(playerid, "spam8");
return 1;
}