Need Help
#4

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]);
}
}
Reply


Messages In This Thread
Need Help - by MBilal - 25.12.2013, 15:38
Re: Need Help - by HardRock - 25.12.2013, 15:43
Re: Need Help - by MBilal - 25.12.2013, 15:50
Re: Need Help - by Raisingz - 25.12.2013, 15:50
Re: Need Help - by MBilal - 25.12.2013, 16:11

Forum Jump:


Users browsing this thread: 3 Guest(s)