You have to set variables so the servers knows which checkpoint to create for the player next. I'll show you a example code of this. I used SetPlayerCheckpoint, and DisablePlayerCheckpoint.
pawn Код:
new
Checkpoint[MAX_PLAYERS],
bool:DoingJob[MAX_PLAYERS];
public OnPlayerConnect(playerid) {
Checkpoint[playerid] = 0, DoingJob[playerid] = false;
}
public OnPlayerSpawn(playerid) {
SendClientMessage(playerid, BLUE, "Go to the checkpoints to do your job.");
SetPlayerCheckpoint(playerid, x, y, z, other parameters);
DoingJob[playerid] = true;
}
public OnPlayerEnterCheckpoint(playerid) {
if(DoingJob[playerid] == true) continue;
switch(Checkpoint[playerid]) {
case 0: {
SendClientMessage(playerid, BLUE, "You've entered your first CP");
Checkpoint[playerid] ++;
SetPlayerCheckpoint(New coordinates and params);
}
case 1: {
SendClientMessage(playerid, BLUE, "You've entered your final CP");
GivePlayerMoney(playerid, 500000); // The pay at the end.
Checkpoint[playerid] = 0;
DoingJob[playerid] = false;
DisablePlayerCheckpoint(playerid);
}
}
}
And so on, do you get my pattern?