16.11.2011, 08:47
o Problema quando alguem usa xiter todos os player do servidor й kickado.
pawn Код:
#define ARMOUR 100
#define LIFE 100
pawn Код:
public OnGameModeInit()
{
SetTimer("ChecarCheater", 1000, true);
pawn Код:
forward ChecarCheater(playerid);
public ChecarCheater(playerid)
{
for( new i = 0; i < MAX_PLAYERS; i ++) {
if(GetPlayerSpecialAction(i) == 2 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Jet-Pack ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
new Float:Vida;
GetPlayerHealth(i, Vida);
if(Vida > LIFE && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Health Hack ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
new Float:Colete;
GetPlayerArmour(i, Colete);
if(Colete > ARMOUR && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Armor Hack ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 18 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Molotov Cocktail ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 17 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Bomba de Gбs ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 35 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Rocket Launcher ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 36 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Bazuca ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 37 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Lanзa Chamas ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 38 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Minigun ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(playerid);
return 1;
}
if(GetPlayerWeapon(i) == 39 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Satchel Charge ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 40 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Detonador ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 44 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Visгo Noturna ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
if(GetPlayerWeapon(i) == 45 && !IsPlayerAdmin(i)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Visгo Noturna ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(i);
return 1;
}
}
return 1;
}