[FilterScript] HP Regen by Gazmull 1.1b
#2

Looks wrong still:
pawn Код:
forward HPreg(playerid);
public HPreg(playerid)
{
        for(new i = 0; i < MAX_PLAYERS; i ++)
        {
            if(IsPlayerConnected(i))
            {
                new Float:pHealth;
                GetPlayerHealth(i, pHealth);
                if(pHealth < 100) SetPlayerHealth(i, pHealth +1); // regenerates +1 hp per 1,000 ms
                if(pHealth < 30) GameTextForPlayer(i,"~r~Find some cover before taking more damage!",3000,3); // announcing that you have low health while regenerating
                        if(pHealth > 100)
                        {
                        SetPlayerHealth(i, 100); //Reset player health when health is full
                        }
                }
        }
}
the playerid parameter isn't used, I'd suggest removing the for loop if you're going to use settimerex... After that, yeah should be much better.
Reply


Messages In This Thread
HP Regen by Gazmull 1.1b - by Gazmull - 12.07.2011, 11:33
Re: HP Regen by Gazmull 1.1b - by Lorenc_ - 12.07.2011, 11:38
Re: HP Regen by Gazmull 1.1b - by Gazmull - 12.07.2011, 11:44
Re: HP Regen by Gazmull 1.1b - by [LvZ]Free - 12.07.2011, 16:22
Re: HP Regen by Gazmull 1.1b - by Gazmull - 13.07.2011, 12:59
Re: HP Regen by Gazmull 1.1b - by fuadya - 16.08.2012, 05:32
Re: HP Regen by Gazmull 1.1b - by xMaGmOtAnEtHx - 17.08.2012, 04:27

Forum Jump:


Users browsing this thread: 2 Guest(s)