I don't know how i can do, but i can think logically:
like.. Create an Array with the co-ordinates the CP's gonna be:
pawn Код:
new Status[MAX_PLAYERS];
new CheckPoints[4][3] = //4 = 4 slots | 3 = 3 "values" (X,Y,Z)
{
{X,Y,Z},
{X,Y,Z},
{X,Y,Z},
{X,Y,Z}
};
Then start the race..
pawn Код:
if(strcmp(cmdtext, "/start", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i)) //to every1 in teh server
{ //0 = normal-------1 = slot 1 | 1 = X---
SetPlayerRaceCheckpoint(i, 0, Checkpoints[1][1], Checkpoints[1][2], Checkpoints[1][3], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[2][3], 10);//10 maybe??
Statur[i] = 1;
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Only for admin's");
}
}
Then when entering CP:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
switch(Status[playerid])
{
case 1:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[2][1], Checkpoints[2][2], Checkpoints[2][3], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[3][3], 10);
Status[i] = 2;
return 1;
}
case 2:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[3][1], Checkpoints[3][2], Checkpoints[3][3], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3], 10);
Status[i] = 3;
return 1;
}
case 3:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 1, Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3]-5, 10); //so it looks down
Status[i] = 4;
return 1;
}
case 4:
{
DisablePlayerRaceCheckpoint(playerid);
GameTextForPlayer(playerid, "You have won the race!!", 3000, 1);
GivePlayerMoney(playerid, 10000);
return 1;
}
}
}
Sorry if this is noobish but i try as hard as i can
hope this helps