How can I make series of checkpoints with timer?
#3

Код:
new CheckPointEntered;

forward CheckPointChange(playerid);
public CheckPointChange(playerid)
{
	if(CheckPointEntered[playerid] == 1)
	{
	    if(IsPlayerInCheckpoint(playerid) == true) //Checking if he/she is in checkpoint
	    {
			DisablePlayerCheckPoint(playerid);
			SetPlayerCheckPoint(); //add your checkpoints here
			CheckPointEntered[playerid] = 2; //Switching the checkpoint to number 2
		}
	}
	return 1;
}
	
public OnPlayerEnterCheckpoint(playerid)
{
    if(CheckPointEntered[playerid] == 1) //If they entered the first checkpoint
    {
        SetTimerEx("CheckPointChange", 10000, false, "i", playerid); //Setting the 10 seconds timer
	}
	return 1;
}
Edit: too late
Reply


Messages In This Thread
How can I make series of checkpoints with timer? - by Daledos - 08.04.2013, 21:46
Re: How can I make series of checkpoints with timer? - by Daledos - 08.04.2013, 22:56
Re: How can I make series of checkpoints with timer? - by Pawnie - 08.04.2013, 23:08

Forum Jump:


Users browsing this thread: 1 Guest(s)