04.09.2013, 22:35
pawn Код:
forward SendAdminMessage(color, string[]);
public SendAdminMessage(color, string[])
{
for(new i; i != MAX_PLAYERS; ++i) if(IsPlayerConnected(i))
{
if(Variбvel >= 1) SendClientMessage(i, color, string);
}
}
Funзгo/callback
{
new string[128];
new Float:pHealth;
GetPlayerHealth(playerid, pHealth);
if(pHealth >= 96)
{
SendClientMessage(playerid, COLOR_RED,"CHEAT DETECTADO: VIDA");
format(string, 128, "O galhudo do %s ta usando cheater de VIDA", PlayerName(playerid)), SendAdminMessage(COLOR_RED, string);
SetPlayerHealth(playerid, 0);
}
new Float:pArmour;
GetPlayerArmour(playerid, pArmour);
if(pArmour >= 96)
{
SendClientMessage(playerid, COLOR_RED,"CHEAT DETECTADO: COLETE");
format(string, 128, "O galhudo do %s ta usando cheater de colete", PlayerName(playerid)), SendAdminMessage(COLOR_RED, string);
SetPlayerArmour(playerid, 0);
}
}
stock PlayerName(playerid)
{
new nomeplayer[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, nomeplayer, MAX_PLAYER_NAME );
return nomeplayer;
}