Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new MissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], TrailerID[MAX_PLAYERS], Payment[MAX_PLAYERS], MissionStatus[MAX_PLAYERS];
- enum PetrolTruckerLocationsEnum
- {
- MissionID,
- LoadName[128],
- Float:LoadX,
- Float:LoadY,
- Float:LoadZ,
- Float:UnloadX,
- Float:UnloadY,
- Float:UnloadZ,
- TrailID
- Pay
- }
- new PetrolTruckerLocations[][PetrolTruckerLocationsEnum] =
- {
- {0, "Hauling 1 to Hauling 2", -24.4073, -281.8898, 5.9985, -305.4319, 1315.6797, 54.6189, 0, 584, 10780},
- {1, "Hauling 1 to Hauling 2", 266.8981, 1416.5417, 10.2001, 1097.5164, 1741.7422, 10.5474, 1, 584, 6700},
- {2, "Hauling 1 to Hauling 2", -1268.8223, 13.6925, 14.8682, -1986.3477, 253.9728, 35.8985, 2, 584, 4780},
- {3, "Hauling 1 to Hauling 2", -1016.3634, -688.2434, 32.7284, -55.3397, -1138.2479, 0.8052, 3, 584, 18770}
- };
- stock TruckerTask(playerid)
- {
- new VehID = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(VehID)== 403 || GetVehicleModel(VehID)== 515 || GetVehicleModel(VehID) == 514)
- {
- if(IsTrailerAttachedToVehicle(VehID))
- {
- if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == TrailID)
- {
- MissionStatus[playerid] = 1;
- new MisRand = random(sizeof(PetrolTruckerLocations));
- new LoadText[128], Float:x, Float:y, Float:z;
- x = PetrolTruckerLocations[MisRand][LoadX];
- y = PetrolTruckerLocations[MisRand][LoadY];
- z = PetrolTruckerLocations[MisRand][LoadZ];
- unx[playerid] = PetrolTruckerLocations[MisRand][UnloadX];
- uny[playerid] = PetrolTruckerLocations[MisRand][UnloadY];
- unz[playerid] = PetrolTruckerLocations[MisRand][UnloadZ];
- Payment[playerid] = PetrolTruckerLocations[MisRand][Pay];
- SetPlayerCheckpoint(playerid, x, y, z, 7);
- format(LoadText, 128, "%s", PetrolTruckerLocations[MisRand][LoadName]);
- SendClientMessage(playerid, -1, "Mission:");
- SendClientMessage(playerid, 0xFFFFFFFF, LoadText);
- }
- else
- {
- SendClientMessage(playerid, -1, "You need correct trailer!");
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "You need a trailer!");
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "You must be in a Truck to perform this!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment