Advertisement
Guest User

Rens

a guest
Mar 16th, 2010
1,908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define COLOR_DARKGOLD 0x808000AA
  4. #define COLOR_RED 0xFF0000AA
  5. #define COLOR_YELLOW 0xFFFF00AA
  6.  
  7. /*new jobtruck[] = {
  8. 512,513,514,515,516};*/
  9. new truckjobrunning = 0;
  10. new info;
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. AddStaticVehicleEx(455,-43.9742,-1155.8762,1.4823,65.0184,-1,-1, 10);
  15. AddStaticVehicleEx(455,-39.6336,-1148.4509,1.5148,62.2225,-1,-1, 10);
  16. AddStaticVehicleEx(455,-37.7033,-1144.2280,1.5173,65.7564,-1,-1, 10);
  17. AddStaticVehicleEx(455,-35.7032,-1140.0637,1.5149,66.4882,-1,-1, 10);
  18. AddStaticVehicleEx(455,-41.9300,-1152.2032,1.5132,62.4657,-1,-1, 10);
  19. AddStaticVehicle(411,2074.7217,-2121.5066,13.3707,270.4157,116,1); //
  20. AddStaticVehicle(411,2065.8503,-2121.5710,13.3679,270.3890,116,1); //
  21. AddStaticVehicle(411,2085.5073,-2121.6392,13.3711,267.6290,116,1); //
  22.  
  23. info = CreatePickup(1239,1,-70.7099,-1139.1187,1.0781,-1);
  24. }
  25.  
  26. public OnPlayerCommandText(playerid, cmdtext[])
  27. {
  28. if (strcmp("/truck", cmdtext, true, 10) == 0)
  29. {
  30. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
  31. {
  32. truckjobrunning = 1;
  33. SetPlayerCheckpoint(playerid, 2058.3142,-2092.4023,9.9832, 10);
  34. GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
  35. new name[MAX_PLAYER_NAME], string[48];
  36. GetPlayerName(playerid, name, sizeof(name));
  37. format(string, sizeof(string), "%s is now a Truck Driver.", name );
  38. SendClientMessageToAll(COLOR_RED, string);
  39.  
  40. return 1;
  41. }
  42. SendClientMessage(playerid, COLOR_RED,"You have to be in a truck to start the job");
  43. }
  44. if (strcmp("/truckinfo", cmdtext, true, 10) == 0)
  45. {
  46. SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the truckload to the airport.");
  47. SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
  48. SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /truck and a red marker will appear.");
  49. SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the marker and you're done.");
  50. return 1;
  51. }
  52. return 0;
  53. }
  54. public OnPlayerEnterCheckpoint(playerid)
  55. {
  56. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
  57. {
  58. GivePlayerMoney(playerid, 10000);
  59. GameTextForPlayer(playerid, "~g~You Completed the job, well done!", 3000, 3);
  60. SetVehicleToRespawn(513);
  61. DisablePlayerCheckpoint(playerid);
  62. truckjobrunning = 0;
  63. }
  64. }
  65. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  66. {
  67. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
  68. {
  69. SendClientMessage(playerid, COLOR_RED, "You can start the truck-mission with /truck");
  70. }
  71. return 0;
  72. }
  73. public OnPlayerExitVehicle(playerid, vehicleid)
  74. {
  75. if((truckjobrunning) == 1)
  76. {
  77. truckjobrunning = 0;
  78. SendClientMessage(playerid, COLOR_RED, "You left your truck behind, get in again if you want to continue your job.");
  79.  
  80. }else if((truckjobrunning) == 0){
  81.  
  82. //Nothing
  83. }
  84. }
  85.  
  86. public OnPlayerPickUpPickup(playerid, pickupid)
  87. {
  88. if(pickupid == info)
  89. {
  90. GameTextForPlayer(playerid, "~g~Welcome at the Truck Driver job, use /truckinfo to know more", 3000, 3);
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement