How do regenerating hp?
#3

Ok i tried and this stuff is not working fine. Hes not keep regenerating my health its just give +1hp and its stop. And i can still use regenerating if my hp is over 100 so easily i can bug my hp. Look
Код:
#define REGENTILL 15000 // Time tell when will the REGEN stop
#define REGENSTART 1000 // Time the regeneration will start

new regentimer;
new regen2timer;
new isRegenerating[MAX_PLAYERS];

forward regenerating(playerid);
forward regen2(playerid);

public regenerating(playerid)
{
  new Float:health;
  GetPlayerHealth(playerid, health);
  SetPlayerHealth(playerid, health+1);
  isRegenerating[playerid] = 1;
  regen2timer = SetTimer("regen2",REGENTILL, false);
  return 1;
}

public regen2(playerid)
{
  KillTimer(regentimer);
  KillTimer(regen2timer);
  isRegenerating[playerid] = 0;
}

CMD:test(playerid)
{
 regentimer = SetTimer("regenerating", REGENSTART, false);
 SendClientMessage(playerid,-1,"You are now regenerating HP");
 return 1;
}
Reply


Messages In This Thread
How do regenerating hp? - by Pokemon64 - 10.03.2017, 09:43
Re: How do regenerating hp? - by Toroi - 10.03.2017, 09:49
Re: How do regenerating hp? - by henkas - 10.03.2017, 10:19
Re: How do regenerating hp? - by Toroi - 10.03.2017, 10:22
Re: How do regenerating hp? - by Pokemon64 - 10.03.2017, 10:25
Re: How do regenerating hp? - by Toroi - 10.03.2017, 10:28
Re: How do regenerating hp? - by Pokemon64 - 10.03.2017, 10:30
Re: How do regenerating hp? - by Toroi - 10.03.2017, 10:31
Re: How do regenerating hp? - by Pokemon64 - 10.03.2017, 10:58
Re: How do regenerating hp? - by Pokemon64 - 10.03.2017, 12:31

Forum Jump:


Users browsing this thread: 1 Guest(s)