17.03.2015, 17:08
Just put together an example.
Think it like x[], y[] and z[] are your different coordinates, i just numbered them to make it easier to understand how they all relate.
Think it like x[], y[] and z[] are your different coordinates, i just numbered them to make it easier to understand how they all relate.
pawn Код:
SetPlayerRaceCheckpoint(playerid, 0, x[0], y[0], z[0], x[1], y[1], z[1], 5);
// Sets the players race checkpoint to the coordinates number "0", and the arrow will be pointing to the next checkpoint, at coordinates number "1"
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 5, x[0], y[0], z[0]))
// If the player is in range of the coordinates number "0", the same coordinates as the first checkpoint is at
{
SetPlayerRaceCheckpoint(playerid, 0, x[1], y[1], z[1], x[2], y[2], z[2], 5);
// Then set the next checkpoint, at coordinates "1", and make the arrow point to coordinates number "2"
}
if(IsPlayerInRangeOfPoint(playerid, 5, x[1], y[1], z[1]))
// If the player is in range of the coordinates number "1", the same coordinates as the second checkpoint is at
{
SetPlayerRaceCheckpoint(playerid, 0, x[2], y[2], z[2], x[3], y[3], z[3], 5);
// Then set the next checkpoint, at coordinates "2", and make the arrow point to coordinates number "3"
}
// Continue for all checkpoints
return 1;
}