05.07.2012, 21:24
So i have pretty much finished making a truck job but i just tested it and when i enter the first checkpoint of the trucker job it says " I have returned to the loading area " When it is only the first checkpoint and there are like 4 others after that please help me why does this do this
If you need any more just code just ask
Please help
Thanks
pawn Code:
if(IsTrailerAttachedToVehicle(carid))
{
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------------------");
SendClientMessage(playerid, YELLOW, "If you leave this truck while doing this job it will respawn");
SendClientMessage(playerid, YELLOW, "You will also lose the money you paid for the load");
SendClientMessage(playerid, WHITE, "Please deliver this load to the first checkpoint");
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------------------");
SetPlayerCheckpoint(playerid, 2206.7930,2451.7891,10.6719, 5.0);
Player[playerid][Money] -= 20000;
Player[playerid][Trucking] = 1;
}
else
{
SendClientMessage(playerid, WHITE, "You did not pick up a trailer which means your truck has now respawned");
SetVehicleToRespawn(carid);
}
pawn Code:
public OnPlayerEnterCheckpoint(playerid)
{
if(Player[playerid][Trucking] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1632.2000,420.9467,7.0313, 5.0);
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
SendClientMessage(playerid, WHITE, "You have reached the first checkpoint");
SendClientMessage(playerid, WHITE, "Deliver this load to the next checkpoint");
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
Player[playerid][Trucking] = 2;
}
if(Player[playerid][Trucking] == 2)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2608.6277,1071.6135,11.0502, 5.0);
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
SendClientMessage(playerid, WHITE, "You have reached the second checkpoint");
SendClientMessage(playerid, WHITE, "Deliver this load to the next checkpoint");
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
Player[playerid][Trucking] = 3;
}
if(Player[playerid][Trucking] == 3)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -2388.0488,964.5991,45.2969, 5.0);
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
SendClientMessage(playerid, WHITE, "You have reached the third checkpoint");
SendClientMessage(playerid, WHITE, "Delivery this load to the next checkpoint");
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
Player[playerid][Trucking] = 4;
}
if(Player[playerid][Trucking] == 4)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 268.2527,1406.8367,10.4755, 5.0);
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
SendClientMessage(playerid, WHITE, "You have reached the forth checkpoint");
SendClientMessage(playerid, WHITE, "Please return to the loading area");
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
Player[playerid][Trucking] = 5;
}
if(Player[playerid][Trucking] == 5)
{
new carid = GetPlayerVehicleID(playerid);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
SendClientMessage(playerid, WHITE, "You have returned to the loading area");
SendClientMessage(playerid, WHITE, "You have been awarded $50000 for completing this job");
SendClientMessage(playerid, WHITE, "------------------------------------------------------------------");
Please help
Thanks