[Help] Health
#3

Add this timer under OnGameModeInit() EDIT looks like the guy above me was quicker
pawn Код:
SetTimer("health", 1000, true); //this sets a timer to repeat every 1 seconds
paste this somewhere outside of any callback
pawn Код:
forward health();
public health()
{
     for(new i =0; i<MAX_PLAYERS; i++)
    {
            new Float:h = GetPlayerHealth(i);      
            if(health =< 20)
           {
                  SetPlayerHealth(i, health-5);
           }
       }
        return 1;
}
Reply


Messages In This Thread
[Help] Health - by viddo - 19.03.2012, 20:50
AW: [Help] Health - by Blunt P - 19.03.2012, 21:00
Re: [Help] Health - by new121 - 19.03.2012, 21:04
Re: [Help] Health - by viddo - 19.03.2012, 22:56

Forum Jump:


Users browsing this thread: 1 Guest(s)