11.12.2009, 23:07
Quote:
Originally Posted by Aber▲
I took it to myself to create it for you. Edit it how you like. (Untested)
pawn Код:
|
pawn Код:
new
healthTimer[MAX_PLAYERS];
pawn Код:
forward RaiseHealth(playerid);
pawn Код:
public RaiseHealth(playerid)
{
new
Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, floatround(health) + 1);
if(health >= 100.0)
{
KillTimer(healthTimer[playerid]);
SetPlayerHealth(playerid, 100);
}
return true;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
healthTimer[playerid] = SetTimerEx("RaiseHealth", 1000, true, "i", playerid);
return true;
}
pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
KillTimer(healthTimer[playerid]);
return true;
}