public OnGameModeInit()
{
SetTimer("USACHealthCheckBan", 500, true);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid, 99);
return 1;
}
forward USACHealthCheckBan(playerid);
public USACHealthCheckBan(playerid)
{
new Float:USACPlayerHealth;
GetPlayerHealth(playerid, USACPlayerHealth);
if(USACPlayerHealth >= 100)
{
Ban(playerid);
}
return 1;
}
delete this ----- SetTimer("USACHealthCheckBan", 500, true);
USACHealthCheckBan(palyerid);
?
SetTimer("USACHealthCheckBan", 500, true);
forward USACHealthCheckBan();
public USACHealthCheckBan()
{
new Float:USACPlayerHealth;
for(new i = 0; i <= GetPlayerPoolSize(); i++)
{
GetPlayerHealth(i, USACPlayerHealth);
if(USACPlayerHealth >= 100)
{
Ban(i);
}
}
return 1;
}
|
Код:
SetTimer("USACHealthCheckBan", 500, true);
Replace your USACHealthCheckBan() function with this, hope it worked. Код:
forward USACHealthCheckBan();
public USACHealthCheckBan()
{
new Float:USACPlayerHealth;
for(new i = 0; i <= GetPlayerPoolSize(); i++)
{
GetPlayerHealth(i, USACPlayerHealth);
if(USACPlayerHealth >= 100)
{
Ban(i);
}
}
return 1;
}
|