Need Help
#1

Hello Every One I need Help How to Heal Player Slowly plz Help me
Reply
#2

Like every second one heal? Use timer...
Reply
#3

Can you give me example
Reply
#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
#5

thanks i will try that
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)