18.06.2013, 03:03
Код:
else if(IsATruckerCar(vehicleid)) { if(PlayerInfo[playerid][pJob] == 20 || PlayerInfo[playerid][pJob2] == 20) { new string[128]; new truckcontents = TruckContents[vehicleid]; new truckcontentname[50]; if(truckcontents == 0) { format(truckcontentname, sizeof(truckcontentname), "None"); } else if(truckcontents >= 1 && truckcontents <= 3) { format(truckcontentname, sizeof(truckcontentname), "{00F70C}Food & beverages");} else if(truckcontents >= 4 && truckcontents <= 6) { format(truckcontentname, sizeof(truckcontentname), "{00F70C}Clothing"); } else if(truckcontents == 7) { format(truckcontentname, sizeof(truckcontentname), "{00F70C}Legal materials"); } else if(truckcontents >= 8 && truckcontents <= 10) { format(truckcontentname, sizeof(truckcontentname), "{00F70C}24/7 items"); } else if(truckcontents >= 11 && truckcontents <= 15) { format(truckcontentname, sizeof(truckcontentname), "{FF0606}Illegal weapons"); } else if(truckcontents >= 16 && truckcontents <= 20) { format(truckcontentname, sizeof(truckcontentname), "{FF0606}Illegal drugs"); } else if(truckcontents >= 21 && truckcontents <= 25) { format(truckcontentname, sizeof(truckcontentname), "{FF0606}Illegal materials"); } format(string, sizeof(string), "TRUCKER JOB: (Truck registration: %s %d) - (Content: %s{FFFF00})", GetVehicleName(vehicleid), vehicleid, truckcontentname); SendClientMessageEx(playerid, COLOR_YELLOW, string); if(IsACop(playerid) && truckcontents >= 11) { SendClientMessageEx(playerid, COLOR_YELLOW, "TRUCKER JOB: To remove the illegal goods type /cleartruck near the Truck."); } if(truckcontents > 0 && TruckUsed[playerid] == INVALID_VEHICLE_ID) { SendClientMessageEx(playerid, COLOR_YELLOW, "TRUCKER JOB: To deliver the goods type /hijacktruck as the driver."); } else if(TruckUsed[playerid] == INVALID_VEHICLE_ID) { SendClientMessageEx(playerid, COLOR_YELLOW, "TRUCKER JOB: To get goods type /loadtruck as the driver."); } else if(TruckUsed[playerid] == vehicleid && gPlayerCheckpointStatus[playerid] == CHECKPOINT_RETURNTRUCK) { SendClientMessageEx(playerid, COLOR_YELLOW, "TRUCKER JOB: This is your Truck, you have not returned it to the docks yet for your pay."); } else if(TruckUsed[playerid] == vehicleid) { SendClientMessageEx(playerid, COLOR_YELLOW, "TRUCKER JOB: This is your Truck, you have not delivered your goods yet."); } else if(TruckUsed[playerid] != INVALID_VEHICLE_ID) { SendClientMessageEx(playerid, COLOR_YELLOW, "TRUCKER JOB: You are already on another delivery, type /cancel truck to cancel that delivery."); } } else { RemovePlayerFromVehicle(playerid); new Float:slx, Float:sly, Float:slz; GetPlayerPos(playerid, slx, sly, slz); SetPlayerPos(playerid, slx, sly, slz); NOPCheck(playerid); SendClientMessageEx(playerid, COLOR_GRAD2, "You are not a Trucker!"); } }