24.02.2011, 13:32
Under OnGameModeInit
Above OnGameModeInit
somewhere in the script (for example last lines):
Код:
SetTimer("healthchecker", 500, true);
Код:
new ivebeenzombied[MAX_PLAYERS];
Код:
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.