26.06.2013, 10:24
Define a new array
Where you create the frist checkpoint
In OnPlayerEnterCheckpoint(playerid)
pawn Код:
new Checkpoint[MAX_PLAYERS];
pawn Код:
SetPlayerCheckpoint(playerid,your frist checkpoint settings..
Checkpoint[playerid] = 1;
In OnPlayerEnterCheckpoint(playerid)
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] == 1) {
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_ORANGE,"Drive back to docks!");
SetPlayerCheckpoint(playerid,2462.9810,-2097.6760,13.5469, 5.0);
Checkpoint[playerid] = 2;
} else if(Checkpoint[playerid] == 2) {
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid,1000);
SendClientMessage(playerid,COLOR_ORANGE,"You have finished delivery!");
DestroyVehicle(GetPlayerVehicleID(playerid));
Checkpoint[playerid] = 0;
}
return 1;
}