15.07.2011, 17:43
i was wonder how to only make my settimer repeat a function only 15times..
here is the function :
-------------------------------------
forward Regernation(playerid);
public Regernation(playerid)
{
new Float:Health;
if (Health > 100)
SetPlayerHealth(playerid, 100.0);
else
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health + 2.0);
return 1;
}
------------------------------------
and the Timer is :
SetTimer("Regernation",2000,true);
here is the function :
-------------------------------------
forward Regernation(playerid);
public Regernation(playerid)
{
new Float:Health;
if (Health > 100)
SetPlayerHealth(playerid, 100.0);
else
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health + 2.0);
return 1;
}
------------------------------------
and the Timer is :
SetTimer("Regernation",2000,true);