little help for a job
#1

Okay so im making mode, with jobs i made the truck job, pilot job, robber, but i have problems with street sweeper, how can i make when i enter checkpoint to set new checkpoint and get 50$ ?
Have one more question..I started my server the login filterscript loaded but when i enter there is no login, same with the house system. PLEASE HELP!
Reply
#2

check out this https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
Reply
#3

yes try like:
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid,50);
SetPlayerCheckpoint(playerid, X, Y, Z, 3.0);
return 1;
}
Reply
#4

But if i want like 5 checkpoints? how to do it?
Reply
#5

you said you have the trucking job try to edit it and change coordinates ,,i made the truck job''
Reply
#6

the truck job is with one checkpoint, i want for street sweeper like 10-11 but i dont know how to make when i enter one to show the next then when you enter it show the next ...
Reply
#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
#8

i understood 1/2, im newbie so can you tell me more do i need to do something like
new cp[10]; or?
Reply
#9

Sorry for such a late response. Yes, you'll need to create a variable for the checkpoints.
pawn Код:
new cp1[MAX_PLAYERS];
new cp2[MAX_PLAYERS];
new cp3[MAX_PLAYERS;

// And so on.
If you're interested in my help, send me a private message and we can arrange something.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)