08.02.2013, 17:59
You'll want to start off by adding the first checkpoint, of course. So if you have a command, or a pickup for the job - You'll want to add
(To set the first checkpoint of course.) Once the player drives to that checkpoint, you'll want to go to the
function. (Don't forget to create a variable for the checkpoints.)
So once they enter the defined checkpoint, it will give them x amount of money - and create a new checkpoint. Repeat the process until the desired amount of checkpoints.
Here's a quick example.
pawn Код:
SetPlayerCheckpoint
pawn Код:
OnPlayerEnterCheckpoint
So once they enter the defined checkpoint, it will give them x amount of money - and create a new checkpoint. Repeat the process until the desired amount of checkpoints.
Here's a quick example.
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(cp1[playerid] == 1)
{
GivePlayerMoney(playerid, 50);
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, x, y, z, 3.0);
cp2[playerid] = 2;
}
if(cp2[playerid] == 2)
{
//do stuff here.
}
return 1;
}
CMD:work(playerid)
{
cp1[playerid] = 1;
SetPlayerCheckpoint(playerid, x, y, z, 3.0);
return 1;
}