little help for a job -
icko202 - 08.02.2013
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!
Re: little help for a job -
SampzzonE - 08.02.2013
check out this
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
Re: little help for a job -
Er@x3r - 08.02.2013
yes try like:
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid,50);
SetPlayerCheckpoint(playerid, X, Y, Z, 3.0);
return 1;
}
Re: little help for a job -
icko202 - 08.02.2013
But if i want like 5 checkpoints? how to do it?
Re: little help for a job -
Er@x3r - 08.02.2013
you said you have the trucking job try to edit it and change coordinates ,,i made the truck job''
Re: little help for a job -
icko202 - 08.02.2013
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 ...
Re: little help for a job -
rangerxxll - 08.02.2013
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 Код:
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;
}
Re: little help for a job -
icko202 - 08.02.2013
i understood 1/2, im newbie so can you tell me more do i need to do something like
new cp[10]; or?
Re: little help for a job -
rangerxxll - 09.02.2013
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.