SA-MP Forums Archive
Lil question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Lil question (/showthread.php?tid=242353)



Lil question - tanush - 19.03.2011

How can i make every 10min player gets 100 % health?


Re: Lil question - antonio112 - 19.03.2011

You want all the connected players to recive 100% health ?


Re: Lil question - admantis - 19.03.2011

pawn Код:
SetTimer("RehealPlayers", 600*1000, true);
pawn Код:
forward RehealPlayers();
public RehealPlayers()
{
for(new z = 0; z < MAX_PLAYERS; z += 1) { SetPlayerHealth(z, 100.00); }
}



Re: Lil question - Davz*|*Criss - 20.03.2011

This under #include <a_samp>

pawn Код:
forward HealAll();
This somewhere in ya script.

pawn Код:
public HealAll()
{
    new playerid;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && (i != playerid)
        {
        SetPlayerHealth(i,100.0);
    }
}
And this under OnPlayerConnect

pawn Код:
SetTimer("HealAll", 10000);
Did not tested. If it does not works.