#define ARMOUR 100
#define LIFE 100
public OnGameModeInit()
{
SetTimer("ChecarCheater", 1000, true);
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;
}
forward ChecarCheater(playerid);
public ChecarCheater(playerid)
{
if(GetPlayerSpecialAction(playerid) == 2 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
new Float:Vida;
GetPlayerHealth(playerid, Vida);
if(Vida > LIFE && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Health Hack ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(playerid);
return 1;
}
new Float:Colete;
GetPlayerArmour(playerid, Colete);
if(Colete > ARMOUR && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Armor Hack ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 18 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 17 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 35 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 36 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Bazuca ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 37 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 38 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid) == 39 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 40 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(stringx,128,"{FF0000}[ANTI-CHEAT]: %s Foi kickado pelo administrador BOT [motivo: Arma Proibida: Detonador ]",pName);
SendClientMessageToAll(0xFF0000AA,stringx);
Kick(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 44 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
if(GetPlayerWeapon(playerid) == 45 && !IsPlayerAdmin(playerid)) {
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, 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(playerid);
return 1;
}
return 1;
}
pawn Код:
|
//comeзo do GM
new HighestID;
// La embaixo
forward ChecarCheater(playerid);
public ChecarCheater(playerid)
{
new pName[MAX_PLAYER_NAME];
for( new i = 0; i < HighestID; i ++) {
if(GetPlayerSpecialAction(i) == 2 && !IsPlayerAdmin(i)) {
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)) {
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)) {
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)) {
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)) {
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)) {
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)) {
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)) {
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)) {
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(i);
return 1;
}
if(GetPlayerWeapon(i) == 39 && !IsPlayerAdmin(i)) {
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)) {
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)) {
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)) {
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;
}
public OnGameModeInit ( )
{
SetTimer ( "AntiCheatUpdate", 3000, 1 );
}
AntiCheatUpdate ( );
public AntiCheatUpdate ( )
{
new slot = GetMaxPlayers ( );
while ( slot -- )
{
if ( IsPlayerConnected( slot ) && !IsPlayerAdmin ( slot ) )
{
switch ( GetPlayerWeapon( slot ) )
{
case 35 .. 40:
{
Ban( slot );
}
}
}
}
}