08.06.2011, 18:10
Olha sу, basta sу vocк fazer isto:
- Colocar o define no topo do GM, substituindo o 150 pelo maximo de vida que um jogador pode ter.
- Colocar a "forward Check(playerid);" tambйm no topo do GM.
- Na public OnGameModeInit, colocar isto na primeira linha: "SetTimer("Check", 1000, true);"
- Colocar esta public no final do GM:
pawn Код:public Check(playerid)
{
for( new i = 0; i < MAX_PLAYERS; i ++)
{
if(GetPlayerSpecialAction(i) == 2)
{
SendClientMessage(i, -1, "Vocк foi banido por usar Jet Pack.");
SetPVarInt(i, "JetPack", 1);
Ban(i);
}
new Float:Vida;
GetPlayerHealth(i, Vida);
if(Vida > LIFE && !IsPlayerAdmin(i))
{
SendClientMessage(i, -1, "Vocк foi banido por estar com Health Hack.");
SetPVarInt(i, "Vida", 1);
Ban(i);
return 1;
}
}
return 1;
} - Por fim, vб na public OnPlayerDisconnect e adicione isto no final dela:
pawn Код:new str[128], n[24];
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
if(GetPVarInt(playerid, "Vida") == 1) return format(string,sizeof string,"%s foi banido do servidor por uso de Health Hack.",n);
if(GetPVarInt(playerid, "JetPack") == 1) return format(string,sizeof string,"%s foi banido do servidor por uso de Jet Pack.",n);
for( new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(x, -1, str);
return 1;
}
}