Posts: 81
Threads: 0
Joined: May 2010
Reputation:
0
You would need the SetTimerEx.
Posts: 83
Threads: 12
Joined: Apr 2008
Reputation:
0
It is in miliseconds. So 10000.
Posts: 918
Threads: 125
Joined: Nov 2010
Under OnGameModeInit
Код:
SetTimer("healthchecker", 500, true);
Above OnGameModeInit
Код:
new ivebeenzombied[MAX_PLAYERS];
somewhere in the script (for example last lines):
Код:
forward healthchecker();
public healthchecker()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float: health;
GetPlayerHealth(playerid, health);
if(ivebeenzombied[i] == 1) return 1;//to stop the code, otherwise it will repeat all the time
if(health < 100) //checks if the player has less health than 100.
{
code...
ivebeenzombied[i] = 1;
}
}
}
return 1;
}
Hope it will help you.