25.12.2013, 15:50
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]);
}
}
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]);
}
}