quick question
#6

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.
Reply


Messages In This Thread
quick question - by Randomai - 24.02.2011, 13:00
Re: quick question - by iMonk3y - 24.02.2011, 13:12
Re: quick question - by DevilG - 24.02.2011, 13:17
Re: quick question - by Luk_Ass - 24.02.2011, 13:19
Re: quick question - by Randomai - 24.02.2011, 13:26
Re: quick question - by Baboon - 24.02.2011, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)