05.01.2012, 18:55
Try this simple code
under GameModeInit put this timer SetTimer("healthcheck", 3000, true);
forward healthcheck();
under GameModeInit put this timer SetTimer("healthcheck", 3000, true);
forward healthcheck();
pawn Код:
public healthcheck()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:phealth;
GetPlayerHealth(i, phealth);
if(phealth >=101)
{
new pname[200];
new string[200];
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string), "SERVER: %s id (%d) has been banned! Reason: Health hack", pname,i);
SendClientMessageToAll(0xffffffff,string);
BanEx(i,string);
}
}
return 1;
}