[FilterScript] HP Regen by Gazmull 1.1b - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] HP Regen by Gazmull 1.1b (
/showthread.php?tid=268361)
HP Regen by Gazmull 1.1b -
Gazmull - 12.07.2011
HP Regen 1.1b
INTRODUCTION
Hi guys i created new version of HP regen.
Since when i created the first one, it's buggy and only for one player(thanks for telling it Lorenc_)
But now i changed it, it works for all players!
How does this works?
If the player has 99 below hp, the script will regenerate +1 health per second for the player. This works for all players.
Compatibles?
It is compatible for TDMs, DMs, Free Roam or Server Owner's Decision :P
Changes
v1.0 - Regenerating for one player only.
v1.0b - Fixed bug, Regenerating for one player only.
v1.1a - Fixed almost of the bugs, Regenerating for all players.
v1.1b - Fixed and Final version, Regenerating for all players.
Rules
*It is forbidden to remove the copyright of the script.
*You can edit anything from it.
*I accept mirrors if you don't want to direct on my website
Credits
Lorenc_
Gazmull
SA-MP
And you for downloading it
Where's the link?
Get it here!
Click me
Re: HP Regen by Gazmull 1.1b -
Lorenc_ - 12.07.2011
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.
Re: HP Regen by Gazmull 1.1b -
Gazmull - 12.07.2011
Oh ok, well it's my nooby way i always use loop and thanks again for correcting me
Re: HP Regen by Gazmull 1.1b -
[LvZ]Free - 12.07.2011
It look's good 8/10
Re: HP Regen by Gazmull 1.1b -
Gazmull - 13.07.2011
Thanks.
Re: HP Regen by Gazmull 1.1b -
fuadya - 16.08.2012
could you give me the link, the link is broken
Re: HP Regen by Gazmull 1.1b -
xMaGmOtAnEtHx - 17.08.2012
new link please