little help for a job
#7

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
pawn Код:
SetPlayerCheckpoint
(To set the first checkpoint of course.) Once the player drives to that checkpoint, you'll want to go to the
pawn Код:
OnPlayerEnterCheckpoint
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 Код:
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;
}
Reply


Messages In This Thread
little help for a job - by icko202 - 08.02.2013, 13:54
Re: little help for a job - by SampzzonE - 08.02.2013, 15:22
Re: little help for a job - by Er@x3r - 08.02.2013, 15:27
Re: little help for a job - by icko202 - 08.02.2013, 15:38
Re: little help for a job - by Er@x3r - 08.02.2013, 16:35
Re: little help for a job - by icko202 - 08.02.2013, 16:53
Re: little help for a job - by rangerxxll - 08.02.2013, 17:59
Re: little help for a job - by icko202 - 08.02.2013, 20:38
Re: little help for a job - by rangerxxll - 09.02.2013, 18:10

Forum Jump:


Users browsing this thread: 2 Guest(s)