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);
}
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, "------------------------------------------------------------------");
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, "------------------------------------------------------------------");
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] == 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; } you sure theese aren't the same checkpoint ![]() |
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, "------------------------------------------------------------------"); |