25.06.2014, 13:43
Hello
I made a script where a guy types /employment and he employs himself as a lawnmower. Then he types /mowland to start doing job. My problem is: How do I make checkpoints? I got coordinates for checkpoints, but how do I make one, and how do I make when he passes through one, the second one appears and so on until the last one where he receives a message like: Job well done, here's your pay 500$ and it gives the money to him? I made this script about the job it may help:
TO EMPLOY:
To start mowing:
How do I make at this mowland that it displays checkpoints? Will be glad to give reputation!

TO EMPLOY:
PHP код:
CMD:employmower(playerid, params[])
{
if(lawnmower[playerid] == 1) SendClientMessage(playerid, COLOR_RED,"[ERROR]{FFFFFF}You're already employed as lawn-mower!");
else if(employment[playerid] == 1) SendClientMessage(playerid, COLOR_RED, "You already have a job!");
else if(!IsPlayerInRangeOfPoint(playerid,3,1895.7168,1729.1393,10.8153)) SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You're not near mowers' hut");
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[SUCCESS!]{FFFFFF}You've employed yourself as a lawnmower!");
employment[playerid] = 1;
lawnmower[playerid] = 1;
}
return 1;
}
PHP код:
CMD:mowland(playerid, params[])
{
new vid = GetPlayerVehicleID(playerid);
if(lawnmower[playerid] == 0) SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You're not employed as lawnmower!") ;
else if(!IsPlayerInRangeOfPoint(playerid, 5,1878.5900,1758.6154,10.4470)) SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF}You're not near mowers' job starting line!");
else if(vid == 572 || IsPlayerInRangeOfPoint(playerid,5,1878.5900,1758.6154,10.4470))
{
job[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[SUCCESS!]{FFFFFF}You've started lawnmowing. Go through checkpoints to finish your job!");
}
return 1;
}