Health colors
#2

pawn Код:
public OnGameModeInit()
{
  SetTimer("ChangeColor", 1000, true);
  return 1;
}
pawn Код:
forward ChangeColor();
public ChangeColor()
{
  for(new i = 0; i < MAX_PLAYERS; i ++)
  {
    new Float:health;
    GetPlayerHealth(i, health);
    if(health < 75)
    {
      if(health < 50)
      {
        if(health < 25) return SetPlayerColor(i, COLOR); // red
        else return SetPlayerColor(i, COLOR); // orange
      }
      else return SetPlayerColor(i, COLOR); // yellow
    }
    else return SetPlayerColor(i, COLOR); // green
  }
  return 1;
}

Reply


Messages In This Thread
Health colors - by westorz - 17.01.2010, 01:27
Re: Health colors - by Miguel - 17.01.2010, 03:57

Forum Jump:


Users browsing this thread: 2 Guest(s)