In you mean normal checkpoints use
SetPlayerCheckpointBut if you want a race use
SetPlayerRaceCheckpoint
Now there are a lot of tutorials for organizing a race, here's a simple one:
The command
pawn Код:
if (strcmp("/joinrace", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,x,y,z);//The coords of the player in the race start
PutPlayerInVehicle(playerid,vehicle,1);//make sure you replace vehicleid with an already defined car
SetPlayerRaceCheckpoint(playerid,type,(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size);//This will be the first checkpoint
return 1;
}
the callback when a player enters the Cp
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
GivePlayerMoney(playerid,100);//Giving the player money
return 1;
}
P.S: this is just an example in you want a whole race you have to use a variable and cases to not mix up the CheckPoints,Check the tutorials.