Health Reducing.
#1

How can I make players losing 2% health every 1 minutes?
Reply
#2

pawn Код:
forward Timer();

public OnGameModeInit()
{
     SetTimer("Timer", 60000, true); // (1 minute interval)
     return 1;
}

public Timer()
{
     new Float: health;
     foreach(Player, i)
     {
          GetPlayerHealth(i, health); // get player health to make a change
          SetPlayerHealth(i, health - 2); // 2 is the percentage> 2%
     }
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)