All pastes #253763 Raw Edit

Something

public text v1 · immutable
#253763 ·published 2006-11-21 02:09 UTC
rendered paste body
First Define it on the top of the script by you colors

#define CP_DRAG1  1
#define CP_DRAG2  2
#define CP_DRAG3  3

//Keep going for all the checkpoints you do


Here is how you start it in a command

if(strcmp(cmd, "/dragrace", true) == 0) {
gPlayerCheckpointStatus[playerid] = CHECKPOINT_RACE1;
SetPlayerCheckpoint(playerid, X , Y , Z , S );


//That just sets up the checkpoint and names it RACE1 Which Will be used later



Ok Blackbird here OnPlayerEnterCheckpoint

public OnPlayerEnterCheckpoint(playerid) {

	switch (gPlayerCheckpointStatus[playerid]) {

        case CHECKPOINT_DRAG1:

		    {
               DisablePlayerCheckpoint(playerid);
               gPlayerCheckpointStatus[playerid] = CHECKPOINT_DRAG2;
               SetPlayerCheckpoint(playerid, X , Y , Z , S );
//This basically means when you enter Checkpoint DRAG1 which was set when you typed the command the command it basically Disables the first one..Then Identifies what the next checkpoint is then acutally sets it
               }  
              case CHECKPOINT_DRAG2:

		    {
               DisablePlayerCheckpoint(playerid);
               gPlayerCheckpointStatus[playerid] = CHECKPOINT_DRAG3;
               SetPlayerCheckpoint(playerid, X , Y , Z , S );
               }


Then here it just is what happens when you enter checkpoint 2...ETC