checkpoint timer help
#3

Code:
public OnPlayerEnterCheckpoint (playerid )
{
GivePlayerMoney (playerid, 10000 );
SetTimerEx("NextCheckpoint1", 30000, false, "i", playerid);
return 1 ;
}

forward NextCheckpoint1(playerid);
public NextCheckpoint1(playerid)
{
DisablePlayerCheckpoint( playerid ) ;
SetTimerEx("NextCheckpoint2", 30000, false, "i", playerid);
// Create checkpoint here, see the example below
return 1 ;
}

// ... here proceed to checkpoint 3, 4, 5, 6 etc.
^

Make a timer to remove the old checkpoint and set a new one, and then again and again.
Also, its good to define each checkpoint you set for the player:

Code:
new checkpoint[6]; // 6 is the number of checkpoints you're going to use, only example

checkpoint[0] = Create checkpoint here
checkpoint[1] = Create checkpoint here

//Then you'll destroy each checkpoint separately by using its definition.
You can also use this if you want to know if the player is STAYING in the checkpoint to proceed to the next one, and if they arent - destroy the timers and send a client message like "Mission failed, you got out of the checkpoint!".

https://sampwiki.blast.hk/wiki/IsPlayerInCheckpoint
Reply


Messages In This Thread
checkpoint timer help - by Dissonancy - 15.06.2016, 07:31
Re: checkpoint timer help - by Dissonancy - 15.06.2016, 08:46
Re: checkpoint timer help - by 1nspire - 15.06.2016, 09:00
Re: checkpoint timer help - by Vince - 15.06.2016, 09:31
Re: checkpoint timer help - by Dissonancy - 15.06.2016, 09:32
Re: checkpoint timer help - by Dissonancy - 15.06.2016, 09:36

Forum Jump:


Users browsing this thread: 1 Guest(s)