Guest User

Untitled

a guest
Apr 1st, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. 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];
  2.  
  3. enum PetrolTruckerLocationsEnum
  4. {
  5. MissionID,
  6. LoadName[128],
  7. Float:LoadX,
  8. Float:LoadY,
  9. Float:LoadZ,
  10. Float:UnloadX,
  11. Float:UnloadY,
  12. Float:UnloadZ,
  13. TrailID
  14. Pay
  15. }
  16.  
  17. new PetrolTruckerLocations[][PetrolTruckerLocationsEnum] =
  18. {
  19. {0, "Hauling 1 to Hauling 2", -24.4073, -281.8898, 5.9985, -305.4319, 1315.6797, 54.6189, 0, 584, 10780},
  20. {1, "Hauling 1 to Hauling 2", 266.8981, 1416.5417, 10.2001, 1097.5164, 1741.7422, 10.5474, 1, 584, 6700},
  21. {2, "Hauling 1 to Hauling 2", -1268.8223, 13.6925, 14.8682, -1986.3477, 253.9728, 35.8985, 2, 584, 4780},
  22. {3, "Hauling 1 to Hauling 2", -1016.3634, -688.2434, 32.7284, -55.3397, -1138.2479, 0.8052, 3, 584, 18770}
  23. };
  24.  
  25. stock TruckerTask(playerid)
  26. {
  27. new VehID = GetPlayerVehicleID(playerid);
  28. if(GetVehicleModel(VehID)== 403 || GetVehicleModel(VehID)== 515 || GetVehicleModel(VehID) == 514)
  29. {
  30. if(IsTrailerAttachedToVehicle(VehID))
  31. {
  32. if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == TrailID)
  33. {
  34. MissionStatus[playerid] = 1;
  35. new MisRand = random(sizeof(PetrolTruckerLocations));
  36. new LoadText[128], Float:x, Float:y, Float:z;
  37. x = PetrolTruckerLocations[MisRand][LoadX];
  38. y = PetrolTruckerLocations[MisRand][LoadY];
  39. z = PetrolTruckerLocations[MisRand][LoadZ];
  40. unx[playerid] = PetrolTruckerLocations[MisRand][UnloadX];
  41. uny[playerid] = PetrolTruckerLocations[MisRand][UnloadY];
  42. unz[playerid] = PetrolTruckerLocations[MisRand][UnloadZ];
  43. Payment[playerid] = PetrolTruckerLocations[MisRand][Pay];
  44. SetPlayerCheckpoint(playerid, x, y, z, 7);
  45. format(LoadText, 128, "%s", PetrolTruckerLocations[MisRand][LoadName]);
  46. SendClientMessage(playerid, -1, "Mission:");
  47. SendClientMessage(playerid, 0xFFFFFFFF, LoadText);
  48. }
  49. else
  50. {
  51. SendClientMessage(playerid, -1, "You need correct trailer!");
  52. }
  53. }
  54. else
  55. {
  56. SendClientMessage(playerid, -1, "You need a trailer!");
  57. }
  58. }
  59. else
  60. {
  61. SendClientMessage(playerid, -1, "You must be in a Truck to perform this!");
  62. }
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment