03.11.2014, 20:47
Your message will show no matter how far you are away from the checkpoint and using the command:
That should work to prevent the message appearing saying that you started a job anywhere. Now it will only work when you are in range of the point.
Try it, and see.
Also, i would need to see the code where you spawn the checkpoint for the job; and where you spawn the checkpoints for driving through.
pawn Код:
CMD:getjob(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 4.0,-46.5548,-108.5900,3.1172))
{
wJob[playerid] = 1; // 1 = YourJobName from defines !
SendClientMessage(playerid, -1, "{FF0000}[INFO]: {15FF00}You have chose your job."); // place the message inside with the brackets, then everything will depend on if the statement above is true.
//if it is not true, none of that above will show.
}
else
{
//send a message or something here saying that the player is not close to the checkpoint if you want to
}
return 1;
}
Try it, and see.
Also, i would need to see the code where you spawn the checkpoint for the job; and where you spawn the checkpoints for driving through.