Guest User

Untitled

a guest
Dec 20th, 2016
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.54 KB | None | 0 0
  1. // CREATOR: COOOL
  2. // Version: 1
  3.  
  4. new WorkBucks = 5000;
  5. new Penality = -650;
  6.  
  7. #define FILTERSCRIPT
  8.  
  9.  
  10. #include <a_samp>
  11. #include <streamer>
  12.  
  13.  
  14. #define PH_D 4834
  15. new TakingPs[MAX_PLAYERS] = 2;
  16. ///////////////CHECKPOINTS || LANDING OR TAKING////////////
  17. new Float:RandomCPs[][3] =
  18. {
  19. {1678.4602,-2625.2407,13.1195}, //LS
  20. {-1275.9586,10.1346,15.5220}, //SF
  21. {1347.2815,1281.2484,12.1943}, //LV
  22. {394.8399,2509.7869,17.8583} //Desert
  23. };
  24.  
  25.  
  26. new cp[MAX_PLAYERS];
  27.  
  28. /////////VEHICLES || PLANES ////////////
  29.  
  30. new pilotvehs[9] =
  31. { 460, 511, 512, 513, 519, 553, 577, 592, 593 };
  32.  
  33. ////////////////////////////////////////
  34.  
  35. new rand;
  36. new rand2;
  37.  
  38. #if defined FILTERSCRIPT
  39.  
  40. public OnFilterScriptInit()
  41. {
  42. print("\n*************************************");
  43. print(" +++++++Pilot Work FS BY COOOL+++++++");
  44. print("***************************************\n");
  45. return 1;
  46. }
  47.  
  48. public OnFilterScriptExit()
  49. {
  50. return 1;
  51. }
  52.  
  53. #endif
  54.  
  55. public OnPlayerCommandText(playerid, cmdtext[])
  56. {
  57. if (!strcmp(cmdtext, "/pcmds"))
  58. {
  59. SendClientMessage(playerid, 0x12FF12AA, "/pwork for work, /pwstop for stopping work, /phelp for some help.");
  60. return 1;
  61. }
  62. if (!strcmp(cmdtext, "/pwork"))
  63. {
  64. if(IsPlayerInAnyVehicle(playerid))
  65. {
  66. new strin[45];
  67. format(strin, sizeof(strin), "%i, %i, %i", pilotvehs[0], pilotvehs[1], pilotvehs[2]);
  68. SendClientMessage(playerid, -1, strin);
  69. new bool:IsPassing[MAX_PLAYERS] = false;
  70. for (new o; o < 9; o++)
  71. {
  72. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == pilotvehs[o])
  73. {
  74. // 476 Rustler
  75. rand = random(sizeof(RandomCPs));
  76. SendClientMessage(playerid, 0x34AA33AA, "As you were in your plane. An airport officer noticed you then he approached you. And");
  77. SendClientMessage(playerid, 0x34AA33AA, "He said: This plane is looking very good while you are");
  78. SendClientMessage(playerid, 0x34AA33AA, "sitting in it. I think you have got the skills for a pilot, So, what about a job in a plane?");
  79. SendClientMessage(playerid, 0x34AA33AA, "You said: Oh my blessing! I was looking for a pilot's job. I want the job.");
  80. SendClientMessage(playerid, 0x34AA33AA, "He said: You are Hiried. Have fun with your job");
  81. cp[playerid] = CreateDynamicCP(RandomCPs[rand][0],RandomCPs[rand][1],RandomCPs[rand][2], 20, -1, playerid, -1, 6000);
  82. TakingPs[playerid] = 1;
  83. IsPassing[playerid] = true;
  84. return 1;
  85. }
  86. }
  87. if(IsPassing[playerid] == false) {
  88. SendClientMessage(playerid, 0xFF6347AA, "Please use planes. Hydra and Rustler not included in planes category.");
  89. }
  90. }
  91. else
  92. {
  93. SendClientMessage(playerid, 0xFF6347AA, "Please get in a plane and then start your work.");
  94. }
  95. return 1;
  96. }
  97.  
  98.  
  99. if(!strcmp(cmdtext, "/phelp"))
  100. {
  101. new phstr[256];
  102. format(phstr, sizeof(phstr), "If you want to became a pilot then worry not we have\n some thing for you, just get in a plane and use /pwork.\n While you are doing your work you will also be \ngiven your payment it is %i per trip. So, have fun and fly just\n one.In last, use /pwstop to stop.", WorkBucks);
  103. ShowPlayerDialog(playerid, PH_D, DIALOG_STYLE_MSGBOX, "Pilots Work Help", phstr, "OK", "Cancel");
  104. return 1;
  105. }
  106.  
  107. if(!strcmp(cmdtext, "/pwstop"))
  108. {
  109. SendClientMessage(playerid, 0xFFFF00AA, "You were flying your plane in a very much fun");
  110. SendClientMessage(playerid, 0xFFFF00AA, "but then a sudden impulse from your heart to your brain made you thought about leaving your job.");
  111. SendClientMessage(playerid, 0xFFFF00AA, "You then got the telephone attached in plane and quickly dialed airport officer's number and");
  112. SendClientMessage(playerid, 0xFFFF00AA, "You said: I am bored of this. I can't handle any plane. Now just I want a leave from my work.");
  113. SendClientMessage(playerid, 0xFFFF00AA, "He said: Are you sure, you really want to quit your job.");
  114. SendClientMessage(playerid, 0xFFFF00AA, "You said: I am sure thrice. I want to quit my job.");
  115. SendClientMessage(playerid, 0xFFFF00AA, "He said: OK! you are out of duty. Have fun in your life.");
  116. DestroyDynamicCP(cp[playerid]);
  117. TakingPs[playerid] = 2;
  118. return 1;
  119. }
  120. return 0;
  121. }
  122.  
  123. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  124. {
  125. if(IsPlayerInDynamicCP(playerid, cp[playerid]))
  126. {
  127. if(TakingPs[playerid] == 1)
  128. {
  129. rand2 = random(sizeof(RandomCPs));
  130. while (rand2 == rand)
  131. {
  132. rand2 = random(sizeof(RandomCPs));
  133. }
  134. SendClientMessage(playerid, 0x00FF24AA, "You took passengers and now are looking to leave, when ready.");
  135. DestroyDynamicCP(cp[playerid]);
  136. rand = random(sizeof(RandomCPs));
  137. TakingPs[playerid] = 0;
  138. cp[playerid] = CreateDynamicCP(RandomCPs[rand2][0],RandomCPs[rand2][1],RandomCPs[rand2][2], 20, -1, playerid, -1, 6000);
  139. return 1;
  140. }
  141.  
  142. if(TakingPs[playerid] == 0)
  143. {
  144. new wst[180];
  145. new pilotN[MAX_PLAYER_NAME];
  146. GetPlayerName(playerid, pilotN, sizeof(pilotN));
  147. format(wst, sizeof(wst), "Officer looking at you said: Well work MR.%s you have done your job honestly then he fetches something from his pocket and handes to you.", pilotN);
  148. SendClientMessage(playerid, 0x26CF12AA, "You completed your passengers' trip (Which you must have to do), then a staff officer approached you...");
  149. SendClientMessage(playerid, 0x26CF12AA, wst);
  150. SendClientMessage(playerid, 0x26CF12AA, "You then hurried and opened you hand, it was filled with bucks i.e cash. You were payed. If you again need the work type /pwork");
  151. GivePlayerMoney(playerid, WorkBucks);
  152. DestroyDynamicCP(cp[playerid]);
  153. TakingPs[playerid] = 2;
  154. return 1;
  155. }
  156. }
  157. return 1;
  158. }
  159.  
  160. public OnPlayerExitVehicle(playerid, vehicleid)
  161. {
  162. if(TakingPs[playerid] == 1 || TakingPs[playerid] == 0)
  163. {
  164. SendClientMessage(playerid, 0xFF0000AA, "You left your plane, your job, your passengers, your trip and your bucks also because you left your plane... Sad!");
  165. SendClientMessage(playerid, 0xFF0000AA, "The next day an off-duty airport officer (who hired you) was walking on the road. You saw him but you don't think that he had also seen you.");
  166. SendClientMessage(playerid, 0xFF0000AA, "As your thinking glanced your mind. The officer glanced at you. You were seen. You were recognized, So you took off stress on your legs and ran.");
  167. SendClientMessage(playerid, 0xFF0000AA, "You ran and the officer ran also, you ran fast indeed and the officer ran faster then you.");
  168. SendClientMessage(playerid, 0xFF0000AA, "But your bad luck, you slipped but the officer didn't and he caught you with his hands on your face.");
  169. new pstri[198];
  170. format(pstri, sizeof(pstri), "Officer: You are the same one who left the plane, don't you know how many passengers were travelling. I charge you %i for your stupid thing.", Penality);
  171. SendClientMessage(playerid, 0xFF0000AA, pstri);
  172. SendClientMessage(playerid, 0xDFDFDFAA, "Use /pwstop to take no penality charges while leaving your plane.");
  173. GivePlayerMoney(playerid, Penality);
  174. DestroyDynamicCP(cp[playerid]);
  175. TakingPs[playerid] = 2;
  176. }
  177. return 1;
  178. }
  179.  
  180. public OnPlayerDisconnect(playerid, reason)
  181. {
  182. if(TakingPs[playerid] == 1 || TakingPs[playerid] == 0) {
  183. DestroyDynamicCP(cp[playerid]);
  184. TakingPs[playerid] = 2;
  185. }
  186. return 1;
  187. }
  188.  
  189. public OnPlayerDeath(playerid, killerid, reason)
  190. {
  191. if(TakingPs[playerid] == 1 || TakingPs[playerid] == 0) {
  192. DestroyDynamicCP(cp[playerid]);
  193. TakingPs[playerid] = 2;
  194. }
  195. return 1;
  196. }
Add Comment
Please, Sign In to add comment