Advertisement
Guest User

PilotFS

a guest
Feb 27th, 2013
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.03 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3.  
  4. // INCLUDES //
  5. #include <a_samp>
  6. #include <ZCMD>
  7. #include <sscanf2>
  8. #include <streamer>
  9.  
  10. // DEFINES //
  11. #define COL_WHITE "{FFFFFF}"
  12. #define COL_YELLOW "{F3FF02}"
  13. #define COL_RED "{F81414}"
  14. #define COL_BLUE "{0000FF}"
  15.  
  16. #define COLOR_BITEM 0xE1B0B0FF
  17. #define COLOR_GRAD1 0xB4B5B7FF
  18. #define COLOR_GRAD2 0xBFC0C2FF
  19. #define COLOR_GRAD3 0xCBCCCEFF
  20. #define COLOR_GRAD4 0xD8D8D8FF
  21. #define COLOR_GRAD5 0xE3E3E3FF
  22. #define COLOR_GRAD6 0xF0F0F0FF
  23. #define COLOR_GREY 0xAFAFAFAA
  24. #define COLOR_GREEN 0x33AA33AA
  25. #define COLOR_RED 0xAA3333AA
  26. #define COLOR_BLACK 0x000001FF
  27. #define COLOR_BLUE 0x007BD0FF
  28. #define COLOR_LIGHTORANGE 0xFFA100FF
  29. #define COLOR_FLASH 0xFF000080
  30. #define COLOR_LIGHTRED 0xFF6347AA
  31. #define COLOR_LIGHTBLUE 0x33CCFFAA
  32. #define COLOR_LIGHTGREEN 0x9ACD32AA
  33. #define COLOR_YELLOW 0xFFFF00AA
  34. #define COLOR_LIGHTYELLOW 0xFFFF91FF
  35. #define COLOR_YELLOW2 0xF5DEB3AA
  36. #define COLOR_WHITE 0xFFFFFFAA
  37. #define COLOR_FADE1 0xE6E6E6E6
  38. #define COLOR_FADE2 0xC8C8C8C8
  39. #define COLOR_FADE3 0xAAAAAAAA
  40. #define COLOR_FADE4 0x8C8C8C8C
  41. #define COLOR_FADE5 0x6E6E6E6E
  42. #define COLOR_PURPLE 0xC2A2DAAA
  43. #define COLOR_DBLUE 0x2641FEAA
  44. #define COLOR_DOC 0xFF8282AA
  45. #define COLOR_DCHAT 0xF0CC00FF
  46. #define COLOR_NEWS 0xFFA500AA
  47. #define COLOR_OOC 0xE0FFFFAA
  48. #define TEAM_BLUE_COLOR 0x8D8DFF00
  49. #define TEAM_GROVE_COLOR 0x00AA00FF
  50. #define TEAM_AZTECAS_COLOR 0x01FCFFC8
  51. #define NEWBIE_COLOR 0x7DAEFFFF
  52. #define SAMP_COLOR 0xAAC4E5FF
  53. #define COLOR_FAMILY 0x00E6FFC8
  54. #define COLOR_DEPARTMENT 0xFFB300C8
  55. #define COLOR_RADIO 0x996892FF
  56. #define COLOR_FBI 0xF097E2FF
  57. #define COLOR_LSPD 0x041DFBC8
  58. #define COLOR_ADMINCHAT 0xFFB300FF
  59.  
  60. // FORWARDS //
  61. forward GiveRandomJob(playerid);
  62. forward GiveDropOff(playerid);
  63.  
  64. // VARIABLES //
  65. new bool:WantsJob[MAX_PLAYERS];
  66. new bool:HasPilotJob[MAX_PLAYERS];
  67. new bool:IsPlayerInJob[MAX_PLAYERS];
  68. new PilotCars[8];
  69. new Checkpoints[MAX_PLAYERS][8];
  70. new bool:PilotJobs[MAX_PLAYERS][5];
  71. new bool:WantsQuit[MAX_PLAYERS];
  72. new LoadingTimer[MAX_PLAYERS];
  73.  
  74. // PICKUPS //
  75. new jobpickup;
  76.  
  77.  
  78. // STOCKS //
  79. stock IsPilotCar(vehicleid)
  80. {
  81. for(new veh = 0; veh < sizeof(PilotCars); veh++)
  82. {
  83. if(vehicleid == PilotCars[veh]) return 1;
  84. }
  85. return 0;
  86. }
  87.  
  88. stock GetName(playerid)
  89. {
  90. new name[MAX_PLAYER_NAME];
  91. GetPlayerName(playerid, name, sizeof(name));
  92. return name;
  93. }
  94.  
  95. // PUBLICS //
  96. public GiveRandomJob(playerid)
  97. {
  98. for(new q = 0; q < 8; q++) { Checkpoints[playerid][q] = -1; }
  99. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  100. for(new i = 0; i < 5; i ++) { PilotJobs[playerid][i] = false; }
  101. IsPlayerInJob[playerid] = true;
  102. new rand = random(10);
  103. switch(rand)
  104. {
  105. case 0 .. 2:
  106. {
  107. new rand2 = random(2), vtext[32], string[128];
  108. if(rand2 == 0) { vtext = "Passengers"; }
  109. else if(rand2 == 1) { vtext = "Cargo"; }
  110. else if(rand2 == 2) { vtext = "Food"; }
  111. Checkpoints[playerid][0] = CreateDynamicCP(1899.1376,-2354.3645,13.5469, 15.0, 0, 0, 0, 100.0);
  112. SetPlayerMapIcon(playerid, 1, 1899.1376,-2354.3645,13.5469, 0, COLOR_RED, MAPICON_GLOBAL);
  113. PilotJobs[playerid][0] = true;
  114. format(string,sizeof(string),"* {FF0000}Pickup the {0000FF}%s {FF0000}at {00FF00}Los Santos Airport.", vtext);
  115. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  116. }
  117. case 3 .. 5:
  118. {
  119. new rand2 = random(2), vtext[32], string[128];
  120. if(rand2 == 0) { vtext = "Passengers"; }
  121. else if(rand2 == 1) { vtext = "Cargo"; }
  122. else if(rand2 == 2) { vtext = "Food"; }
  123. Checkpoints[playerid][1] = CreateDynamicCP(-1224.5371,11.7382,14.1484, 15.0, 0, 0, 0, 100.0);
  124. SetPlayerMapIcon(playerid, 2, -1224.5371,11.7382,14.1484, 0, COLOR_RED, MAPICON_GLOBAL);
  125. PilotJobs[playerid][1] = true;
  126. format(string,sizeof(string),"* {FF0000}Pickup the {0000FF}%s {FF0000}at {00FF00}San Fierro Airport.", vtext);
  127. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  128. }
  129. case 6 .. 8:
  130. {
  131. new rand2 = random(2), vtext[32], string[128];
  132. if(rand2 == 0) { vtext = "Passengers"; }
  133. else if(rand2 == 1) { vtext = "Cargo"; }
  134. else if(rand2 == 2) { vtext = "Food"; }
  135. Checkpoints[playerid][2] = CreateDynamicCP(365.3524,2537.1438,16.6648, 15.0, 0, 0, 0, 100.0);
  136. SetPlayerMapIcon(playerid, 3, 365.3524,2537.1438,16.6648, 0, COLOR_RED, MAPICON_GLOBAL);
  137. PilotJobs[playerid][2] = true;
  138. format(string,sizeof(string),"* {FF0000}Pickup the {0000FF}%s {FF0000}at {00FF00}Abondant Airport.", vtext);
  139. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  140. }
  141. case 9 .. 10:
  142. {
  143. new rand2 = random(2), vtext[32], string[128];
  144. if(rand2 == 0) { vtext = "Passengers"; }
  145. else if(rand2 == 1) { vtext = "Cargo"; }
  146. else if(rand2 == 2) { vtext = "Food"; }
  147. Checkpoints[playerid][3] = CreateDynamicCP(1301.4873,1356.2103,10.8203, 15.0, 0, 0, 0, 100.0);
  148. SetPlayerMapIcon(playerid, 4, 1301.4873,1356.2103,10.8203, 0, COLOR_RED, MAPICON_GLOBAL);
  149. PilotJobs[playerid][3] = true;
  150. format(string,sizeof(string),"* {FF0000}Pickup the {0000FF}%s {FF0000}at {00FF00}Las Venturas Airport.", vtext);
  151. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  152. }
  153. }
  154. return 1;
  155. }
  156.  
  157. public GiveDropOff(playerid)
  158. {
  159. KillTimer(LoadingTimer[playerid]);
  160. TogglePlayerControllable(playerid, true);
  161. DisablePlayerCheckpoint(playerid);
  162. for(new i = 0; i < 5; i ++) { PilotJobs[playerid][i] = false; }
  163. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  164. for(new q = 0; q < 8; q++) { Checkpoints[playerid][q] = -1; }
  165. IsPlayerInJob[playerid] = false;
  166. new rand = random(10000), string[128];
  167. SendClientMessage(playerid, COLOR_YELLOW, "* BOSS: Well done pilot, here's your money.");
  168. format(string,sizeof(string),"* You've succesfully transported your transport, you recieve $%d from your boss.", rand);
  169. GivePlayerMoney(playerid, rand);
  170. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  171. GameTextForPlayer(playerid, "~r~SUCCESFULLY TRANSPORTED", 3000, 3);
  172. return 1;
  173. }
  174.  
  175. #if defined FILTERSCRIPT
  176.  
  177. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  178. {
  179. if(checkpointid == Checkpoints[playerid][0] || checkpointid == Checkpoints[playerid][1] || checkpointid == Checkpoints[playerid][2] || checkpointid == Checkpoints[playerid][3])
  180. {
  181. for(new q = 0; q < 8; q++) { Checkpoints[playerid][q] = -1; }
  182. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  183. DisablePlayerCheckpoint(playerid);
  184. new rand = random(10);
  185. switch(rand)
  186. {
  187. case 0 .. 2:
  188. {
  189. new string[128];
  190. Checkpoints[playerid][4] = CreateDynamicCP(1899.1376,-2354.3645,13.5469, 15.0, 0, 0, 0, 100.0);
  191. SetPlayerMapIcon(playerid, 5, 1899.1376,-2354.3645,13.5469, 0, COLOR_RED, MAPICON_GLOBAL);
  192. format(string,sizeof(string),"* {FF0000}Drop your {0000FF}transport {FF0000}off at {00FF00}Los Santos Airport.");
  193. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  194. }
  195. case 3 .. 5:
  196. {
  197. new string[128];
  198. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  199. Checkpoints[playerid][5] = CreateDynamicCP(-1224.5371,11.7382,14.1484, 15.0, 0, 0, 0, 100.0);
  200. SetPlayerMapIcon(playerid, 6, -1224.5371,11.7382,14.1484, 0, COLOR_RED, MAPICON_GLOBAL);
  201. format(string,sizeof(string),"* {FF0000}Drop your {0000FF}transport {FF0000}off at {00FF00}San Fierro Airport.");
  202. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  203. }
  204. case 6 .. 8:
  205. {
  206. new string[128];
  207. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  208. Checkpoints[playerid][6] = CreateDynamicCP(365.3524,2537.1438,16.6648, 15.0, 0, 0, 0, 100.0);
  209. SetPlayerMapIcon(playerid, 7, 365.3524,2537.1438,16.6648, 0, COLOR_RED, MAPICON_GLOBAL);
  210. format(string,sizeof(string),"* {FF0000}Drop your {0000FF}transport {FF0000}off at {00FF00}Abondant Airport.");
  211. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  212. }
  213. case 9 .. 10:
  214. {
  215. new string[128];
  216. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  217. Checkpoints[playerid][7] = CreateDynamicCP(1301.4873,1356.2103,10.8203, 15.0, 0, 0, 0, 100.0);
  218. SetPlayerMapIcon(playerid, 8, 1301.4873,1356.2103,10.8203, 0, COLOR_RED, MAPICON_GLOBAL);
  219. format(string,sizeof(string),"* {FF0000}Drop your {0000FF}transport {FF0000}off at {00FF00}Las Venturas Airport.");
  220. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  221. }
  222. }
  223. }
  224. else if(checkpointid == Checkpoints[playerid][4] || checkpointid == Checkpoints[playerid][5] || checkpointid == Checkpoints[playerid][6] || checkpointid == Checkpoints[playerid][7])
  225. {
  226. TogglePlayerControllable(playerid, false);
  227. for(new i = 0; i < 9; i++) { RemovePlayerMapIcon(playerid, i); }
  228. LoadingTimer[playerid] = SetTimerEx("GiveDropOff", 5000, 0, "d", playerid);
  229. GameTextForPlayer(playerid, "~w~UN~r~LOADING", 5000, 3);
  230. }
  231. return 1;
  232. }
  233.  
  234. public OnFilterScriptInit()
  235. {
  236. print("Pilot FS by Da Noob succesfully loaded.");
  237.  
  238. // JOB PICKUP
  239. jobpickup = CreatePickup(1239, 1, 1958.3483,-2182.4187,13.5469);
  240. Create3DTextLabel("Type /join to become a pilot", COLOR_GREEN, 1958.3483,-2182.4187,13.5469, 10.0, 0, 0); // 3D TEXT LABEL FOR INFO
  241.  
  242. // AIRPLANES
  243. PilotCars[0] = AddStaticVehicleEx(519,1889.6531,-2629.1267,14.4657,0,-1,-1,900); // Shamal 1
  244. PilotCars[1] = AddStaticVehicleEx(519,1823.1190,-2629.1267,14.4657,0,-1,-1,900); // Shamal 2
  245. PilotCars[2] = AddStaticVehicleEx(519,1754.5325,-2629.1267,14.4657,0,-1,-1,900); // Shamal 3
  246. PilotCars[3] = AddStaticVehicleEx(487,1964.2646,-2629.1267,13.7619,0,-1,-1,900); // Heli 1
  247. PilotCars[4] = AddStaticVehicleEx(487,1944.7985,-2629.1267,13.7354,0,-1,-1,900); // Heli 2
  248. PilotCars[5] = AddStaticVehicleEx(417,1765.6274,-2285.0801,26.8743,0,-1,-1,900); // Levi 1
  249. PilotCars[6] = AddStaticVehicleEx(593,1616.7531,-2627.9131,14.0094,0,-1,-1,900); // Dodo 1
  250. PilotCars[7] = AddStaticVehicleEx(593,1681.9587,-2627.9131,14.0094,0,-1,-1,900); // Dodo 2
  251.  
  252. return 1;
  253. }
  254.  
  255. public OnFilterScriptExit()
  256. {
  257. return 1;
  258. }
  259.  
  260. public OnPlayerRequestClass(playerid, classid)
  261. {
  262. return 0;
  263. }
  264.  
  265. public OnPlayerConnect(playerid)
  266. {
  267. WantsJob[playerid] = false;
  268. HasPilotJob[playerid] = true; // TESTING PURPOSES - Needs to be set to FALSE
  269. IsPlayerInJob[playerid] = false;
  270. WantsQuit[playerid] = false;
  271.  
  272. for(new i = 0; i < 5; i++) { PilotJobs[playerid][i] = false; }
  273. return 1;
  274. }
  275.  
  276. public OnPlayerDisconnect(playerid, reason)
  277. {
  278. return 1;
  279. }
  280.  
  281. public OnPlayerSpawn(playerid)
  282. {
  283. return 0;
  284. }
  285.  
  286. public OnPlayerDeath(playerid, killerid, reason)
  287. {
  288. return 1;
  289. }
  290.  
  291. public OnVehicleSpawn(vehicleid)
  292. {
  293. return 1;
  294. }
  295.  
  296. public OnVehicleDeath(vehicleid, killerid)
  297. {
  298. return 1;
  299. }
  300.  
  301. public OnPlayerText(playerid, text[])
  302. {
  303. return 1;
  304. }
  305.  
  306. public OnPlayerCommandText(playerid, cmdtext[])
  307. {
  308. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  309. {
  310. // Do something here
  311. return 1;
  312. }
  313. return 0;
  314. }
  315.  
  316. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  317. {
  318. if(IsPilotCar(vehicleid))
  319. {
  320. if(HasPilotJob[playerid] == true) {}
  321. else
  322. {
  323. new Float:x, Float:y, Float:z;
  324. GetPlayerPos(playerid, x, y, z);
  325. SetPlayerPos(playerid, x, y, z);
  326. SendClientMessage(playerid, COLOR_GREY, "You need to be a pilot to enter an airplane.");
  327. }
  328. }
  329. return 1;
  330. }
  331.  
  332. public OnPlayerExitVehicle(playerid, vehicleid)
  333. {
  334. if(HasPilotJob[playerid] == true)
  335. {
  336. if(PilotJobs[playerid][0] == true || PilotJobs[playerid][1] == true || PilotJobs[playerid][2] == true || PilotJobs[playerid][3] == true)
  337. {
  338. for(new i = 0; i < 5; i++) { PilotJobs[playerid][i] = false; }
  339. for(new a = 0; a < 9; a++) { RemovePlayerMapIcon(playerid, a); }
  340. for(new q = 0; q < 9; q++) { Checkpoints[playerid][q] = -1; }
  341. IsPlayerInJob[playerid] = false;
  342. SendClientMessage(playerid, COLOR_YELLOW, "* BOSS: Quiting before delivering? I'm taking that from your paycheck!");
  343. GivePlayerMoney(playerid, -1000);
  344. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Your Boss took 1000$ from your paycheck.");
  345. }
  346. }
  347. return 1;
  348. }
  349.  
  350. public OnPlayerStateChange(playerid, newstate, oldstate)
  351. {
  352. return 1;
  353. }
  354.  
  355. public OnPlayerEnterCheckpoint(playerid)
  356. {
  357. return 1;
  358. }
  359.  
  360. public OnPlayerLeaveCheckpoint(playerid)
  361. {
  362. return 1;
  363. }
  364.  
  365. public OnPlayerEnterRaceCheckpoint(playerid)
  366. {
  367. return 1;
  368. }
  369.  
  370. public OnPlayerLeaveRaceCheckpoint(playerid)
  371. {
  372. return 1;
  373. }
  374.  
  375. public OnRconCommand(cmd[])
  376. {
  377. return 1;
  378. }
  379.  
  380. public OnPlayerRequestSpawn(playerid)
  381. {
  382. return 1;
  383. }
  384.  
  385. public OnObjectMoved(objectid)
  386. {
  387. return 1;
  388. }
  389.  
  390. public OnPlayerObjectMoved(playerid, objectid)
  391. {
  392. return 1;
  393. }
  394.  
  395. public OnPlayerPickUpPickup(playerid, pickupid)
  396. {
  397. if(pickupid == jobpickup)
  398. {
  399. GameTextForPlayer(playerid, "PILOT JOB", 3000, 3);
  400. }
  401. return 1;
  402. }
  403.  
  404. public OnVehicleMod(playerid, vehicleid, componentid)
  405. {
  406. return 1;
  407. }
  408.  
  409. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  410. {
  411. return 1;
  412. }
  413.  
  414. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  415. {
  416. return 1;
  417. }
  418.  
  419. public OnPlayerSelectedMenuRow(playerid, row)
  420. {
  421. return 1;
  422. }
  423.  
  424. public OnPlayerExitedMenu(playerid)
  425. {
  426. return 1;
  427. }
  428.  
  429. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  430. {
  431. return 1;
  432. }
  433.  
  434. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  435. {
  436. return 1;
  437. }
  438.  
  439. public OnRconLoginAttempt(ip[], password[], success)
  440. {
  441. return 1;
  442. }
  443.  
  444. public OnPlayerUpdate(playerid)
  445. {
  446. return 1;
  447. }
  448.  
  449. public OnPlayerStreamIn(playerid, forplayerid)
  450. {
  451. return 1;
  452. }
  453.  
  454. public OnPlayerStreamOut(playerid, forplayerid)
  455. {
  456. return 1;
  457. }
  458.  
  459. public OnVehicleStreamIn(vehicleid, forplayerid)
  460. {
  461. return 1;
  462. }
  463.  
  464. public OnVehicleStreamOut(vehicleid, forplayerid)
  465. {
  466. return 1;
  467. }
  468.  
  469. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  470. {
  471. return 1;
  472. }
  473.  
  474. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  475. {
  476. return 1;
  477. }
  478.  
  479. CMD:join(playerid)
  480. {
  481. if(IsPlayerInRangeOfPoint(playerid, 5.0, 1958.3483,-2182.4187,13.5469))
  482. {
  483. if(HasPilotJob[playerid] == false)
  484. {
  485. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You're about to become a Pilot, use /accept job to accept.");
  486. WantsJob[playerid] = true;
  487. }
  488. else
  489. {
  490. SendClientMessage(playerid, COLOR_GRAD2, "You're already a pilot.");
  491. }
  492. }
  493. return 1;
  494. }
  495.  
  496. CMD:accept(playerid, params[])
  497. {
  498. new objective[32];
  499. if(sscanf(params,"s[32]", objective)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /accept [job]");
  500. {
  501. if(!strcmp(objective, "job", true))
  502. {
  503. if(WantsJob[playerid] == true)
  504. {
  505. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You're now a Pilot. Use /pilothelp to see your new commands.");
  506. SetPlayerSkin(playerid, 61);
  507. HasPilotJob[playerid] = true;
  508. }
  509. else
  510. {
  511. SendClientMessage(playerid, COLOR_GRAD2, "You don't want a job (believe me).");
  512. }
  513. }
  514. if(!strcmp(objective,"quit",true))
  515. {
  516. if(WantsQuit[playerid] == true)
  517. {
  518. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You've quit your Pilot job.");
  519. HasPilotJob[playerid] = false;
  520. for(new i = 0; i < 5; i++) { PilotJobs[playerid][i] = false; }
  521. DisablePlayerCheckpoint(playerid);
  522. }
  523. else
  524. {
  525. SendClientMessage(playerid, COLOR_GRAD2, "You don't want to quit your job (believe me).");
  526. }
  527. }
  528. }
  529. return 1;
  530. }
  531.  
  532. CMD:pilothelp(playerid)
  533. {
  534. ShowPlayerDialog(playerid, 9852, DIALOG_STYLE_MSGBOX, "Pilot Help", "{FF0000} PILOT HELP\n\n{00FF00}/work {0000FF}-> {FFFFFF}Use this while in an airplane to start your work.\n{00FF00}/quitjob {0000FF}-> {FFFFFF}Quit your awesome pilot job.\n{00FF00}/accept [job/quit] {0000FF}-> {FFFFFF}Accept or quit your pilot job.\n{00FF00}/join {0000FF}-> {FFFFFF}When in Pilot pickup, you can join the Pilot job.\n{00FF00}/pilothelp {0000FF}-> {FFFFFF}Displays this dialog.", "Done", "");
  535. return 1;
  536. }
  537.  
  538. CMD:work(playerid)
  539. {
  540. new vehicleid = GetPlayerVehicleID(playerid);
  541. if(HasPilotJob[playerid] == false) return SendClientMessage(playerid, COLOR_GRAD2, "You're not a pilot.");
  542. if(IsPlayerInJob[playerid] == true) return SendClientMessage(playerid, COLOR_GRAD2, "Deliver your other transport first!");
  543. if(GetVehicleModel(vehicleid) != 519 && GetVehicleModel(vehicleid) != 487 && GetVehicleModel(vehicleid) != 417 && GetVehicleModel(vehicleid) != 593) return SendClientMessage(playerid, COLOR_GRAD2, "You're not in an airplane.");
  544. {
  545. GiveRandomJob(playerid);
  546. }
  547. return 1;
  548. }
  549.  
  550. CMD:quitjob(playerid)
  551. {
  552. if(HasPilotJob[playerid] == false) return SendClientMessage(playerid, COLOR_GRAD2, "You're not a pilot.");
  553. {
  554. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You're about to quit your Pilot job, use /accept quit to quit.");
  555. WantsQuit[playerid] = true;
  556. }
  557. return 1;
  558. }
  559.  
  560. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement