make a timer refill hp
#1

hello .i want make a timer that when is player on death the tiimer
refill player health +5 hp auto per 5 sec and then if the player's hp refill to 50 then toggle player is 1, i do this
: where is wrong ?

Код:
forward heal();
 
this is under ongamemod
  SetTimer("heal",5000,0);

public OnPlayerDeath(playerid, killerid, reason)
{
 TogglePlayerControllable(playerid,0);

   new Float:health;
     GetPlayerHealth(playerid);
   heal =   SetPlayerHealth(playerid, health+5);
	if GetPlayerHealth(playerid)== 50) {
	 TogglePlayerControllable(playerid,1);
	SetPlayerPos(playerid,12002,1202,20);
  }

   	return 1;
}
Reply


Messages In This Thread
make a timer refill hp - by omidi - 29.07.2010, 11:41
Re: make a timer refill hp - by mihaitza55 - 29.07.2010, 12:07
Re: make a timer refill hp - by iggy1 - 29.07.2010, 12:21
Re: make a timer refill hp - by omidi - 30.07.2010, 09:52
Re: make a timer refill hp - by Hiddos - 30.07.2010, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)