06.07.2012, 11:19
So pretty much a trucker job that i have is messing up pretty bad when ever i enter the first checkpoint it sends me all the messages for all the checkpoints and then says i have returned to the loading area even though i have just went through the first checkpoint please help
If you need any more code just ask
Please help
Thanks
pawn Код:
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;
Player[playerid][Checkpoint] = 1;
}
pawn Код:
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, "------------------------------------------------------------------");
Player[playerid][Money] += 50000;
Player[playerid][Checkpoint] = 0;
Player[playerid][Trucking] = 0;
Please help
Thanks