27.11.2014, 15:56
i want to create a job, when i enter the vehicle i type /startjob, and it shows the first checkpoint but when i enter the first checkpoint the second checkpoint doesnt show up , how to fix that??
now when player enter checkpoint
pawn Код:
CMD:startjob(playerid, params[])
{
if(PlayerInfo[playerid][pJob] == 1)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsAjobCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE)
{
SendClientMessage(playerid, COLOR_GREY, "[job]: Follow The Checkpoints and get your reward.");
SetPlayerCheckpoint(playerid, -309.0990,-1381.1797,10.7049, 10);
working[playerid] =1;
}
}
else return SendClientMessage(playerid, COLOR_GREY, "[job]: You are not at job car!!");
}
else return SendClientMessage(playerid, COLOR_GREY, "[job]: You are not a working man!");
return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, -309.0990,-1381.1797,10.7049))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[Job]: You got 23 More checkpoints to go.");
SetPlayerCheckpoint(playerid, -286.6838,-1366.6523,9.2448, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -286.6838,-1366.6523,9.2448))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[Job]: You got 22 More checkpoints to go.");
SetPlayerCheckpoint(playerid, -299.1016,-1345.1233,7.8737, 10);
}
return 1;
}