17.03.2010, 08:11
I noticed you were missing a bracket.
See if that helps?
pawn Код:
//The function below is called every 250ms
public HealthCheck()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerState(i) != PLAYER_STATE_SPECTATING && GetPlayerState(i) != PLAYER_STATE_WASTED)
{
new Float:health;
GetPlayerHealth(i, health);
if(health >= 100.0)
{
SetPlayerHealth(i, 75.0);
GetPlayerHealth(i, health);
if(health > 75.0)
{
SendClientMessage(i, COLOR_RED, "-> Cheater");
}
else
{
SendClientMessage(i, COLOR_RED, "-> Clean");
SetPlayerHealth(i, 100.0);
}
}
}
}
}