08.01.2012, 11:58
Hello, i wanted to make the players loses health automatically after his hp goes under 20 who can help me with it?
public OnGameModeInit()
{
SetTimer("LifeCheck", 30000, true);
return 1;
}
public LifeCheck()
{
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
new Float:health;
GetPlayerHealth(i, health);
SetPlayerHealth(i, health-1);
}
}
return 1;
}