Need Help - 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)
+--- Thread: Need Help (
/showthread.php?tid=483374)
Need Help -
MBilal - 25.12.2013
Hello Every One I need Help How to Heal Player Slowly plz Help me
Re: Need Help -
HardRock - 25.12.2013
Like every second one heal? Use timer...
Re: Need Help -
MBilal - 25.12.2013
Can you give me example
Re: Need Help -
Raisingz - 25.12.2013
new HealTimer[MAX_PLAYERS];
new healCounter = -1;
HealTimer[playerid] = SetTimerEx("HealSlowly", time, true, "i", playerid); //add your favorite time, i think 500 is quite good
forward HealSlowly(playerid);
public HealSlowly(playerid){
if(healCounter == -1){
new health;
GetPlayerHealth(playerid, health);
healCounter = health;
}
healCounter++;
SetPlayerHealth(playerid, healCounter);
if(healCounter == MAX_VALUE){ //define your max_value if you want, otherwise use 100
KillTimer(HealTimer[playerid]);
}
}
Re: Need Help -
MBilal - 25.12.2013
thanks i will try that