Code:
CMD:trucker(playerid, params[])
{
new TruckCheck;
TruckCheck = GetVehicleModel(GetPlayerVehicleID(playerid));
if(TruckCheck == 403 || TruckCheck == 515 || TruckCheck == 514 )
{
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,COLOR_RED,"[pr0jobz]You don't have a trailer attached to the vehicle!"); return 1; }
if(TruckJob[playerid] != 1) && TruckJob[playerid] != 2) && TruckJob[playerid] != 3) && TruckJob[playerid] != 4) && TruckJob[playerid] != 5) && TruckJob[playerid] != 6) && TruckJob[playerid] != 7) { TruckJob[playerid] = 1; }
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[pr0jobz]%s is now trucking,please do not disturb him/her.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
if(TruckJob[playerid] == 1){
TruckJob[playerid] = 2;
SetPlayerCheckpoint(playerid,1944.7424,-1771.1267,13.1157,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: San Fierro Docks");
return 1;
}
if(TruckJob[playerid] == 2){
TruckJob[playerid] = 3;
SetPlayerCheckpoint(playerid,1003.4263,-941.8485,41.8079,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: Saw Mill");
return 1;
}
if(TruckJob[playerid] == 3){
TruckJob[playerid] = 4;
SetPlayerCheckpoint(playerid,-97.8173,-1166.7585,2.2650,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: Chilliad Item Shack");
return 1;
}
if(TruckJob[playerid] == 4){
TruckJob[playerid] = 5;
SetPlayerCheckpoint(playerid,-97.8173,-1166.7585,2.2650,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: LVA");
return 1;
}
if(TruckJob[playerid] == 5){
TruckJob[playerid] = 6;
SetPlayerCheckpoint(playerid,-97.8173,-1166.7585,2.2650,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: LV Space Research Center");
return 1;
}
if(TruckJob[playerid] == 6){
TruckJob[playerid] = 7;
SetPlayerCheckpoint(playerid,-97.8173,-1166.7585,2.2650,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: LS Transfender");
return 1;
}
if(TruckJob[playerid] == 7){
TruckJob[playerid] = 1;
SetPlayerCheckpoint(playerid,1944.7424,-1771.1267,13.1157,10);
SendClientMessage(playerid, COLOR_YELLOW,"[pr0jobz]Destination: San Fierro Docks");
return 1;
}
return 1;
}
return SendClientMessage(playerid, COLOR_RED,"[pr0jobz]You have to be in a Roadtrain,Linerunner or Tanker to start the job");
}