to stop repeating the checkpoint
#3

Quote:
Originally Posted by Aber▲
I took it to myself to create it for you. Edit it how you like. (Untested)
pawn Код:
code..
You're code is wrong.

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;
}
Reply


Messages In This Thread
to stop repeating the checkpoint - by WardenCS - 11.12.2009, 22:43
Re: to stop repeating the checkpoint - by Abernethy - 11.12.2009, 22:54
Re: to stop repeating the checkpoint - by Correlli - 11.12.2009, 23:07

Forum Jump:


Users browsing this thread: 1 Guest(s)