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

Hello,
I want to put a script in my gamemode with 10 coords, that as soon as the player enters the first checkpoint and after 5 seconds it remains inside, the sect coordinate the second checkpoint to the second and so on...

Can anyone help me?
Sorry for my bad english... Thank's!
Reply
#2

I'M SOLVED! Thank
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)