Advertisement
Guest User

Untitled

a guest
Mar 10th, 2011
4,874
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.86 KB | None | 0 0
  1. //========================================================//
  2. //=[ Job System by [RDM]Ionutz Please do not edit credits]=//
  3. //========================================================//
  4. //Includes
  5. #include <a_samp>
  6. //Defines
  7. //Colors
  8. #define COLOR_JOIN 0xFFC0CBAA //Pink Roz:))
  9. #define COLOR_GREY 0xAFAFAFAA
  10. #define COLOR_GREEN 0x33AA33AA
  11. #define COLOR_RED 0xAA3333AA
  12. #define COLOR_YELLOW 0xFFFF00AA
  13. #define COLOR_WHITE 0xFFFFFFAA
  14. #define COLOR_ULTRARED 0xE60000FF
  15. #define COLOR_BLUE 0x0000BBAA
  16. #define COLOR_LIGHTGREEN 0x9ACD32AA
  17. #define COLOR_LIGHTBLUE 0x33CCFFAA
  18. #define ADMIN_RED 0xFB0000FF
  19. #define COLOR_ORANGE 0xFF9900AA
  20. #define COLOR_LIME 0x10F441AA
  21. #define COLOR_MAGENTA 0xFF00FFFF
  22. #define PLAYER_COLOR 0xFFFFFFFF
  23. #define ANNOUNCEMENT 0x6AF7E1FF
  24. #define COLOR_SYSTEM 0xEFEFF7AA
  25. #define NICESKY 0x99FFFFAA
  26. #define WHITE 0xFFFFFFFF
  27. #define COLOR_PURPLE 0x9900FFAA
  28. #define COLOR_ALIEN 0x90FF87FF
  29. #define COLOR_NAVY 0x000080AA
  30. #define COLOR_AQUA 0xF0F8FFAA
  31. #define COLOR_CRIMSON 0xDC143CAA
  32. #define COLOR_FLBLUE 0x6495EDAA
  33. #define COLOR_BISQUE 0xFFE4C4AA
  34. #define COLOR_BLACK 0x000000AA
  35. #define COLOR_CHARTREUSE 0x7FFF00AA
  36. #define COLOR_BROWN 0XA52A2AAA
  37. #define COLOR_CORAL 0xFF7F50AA
  38. #define COLOR_GOLD 0xB8860BAA
  39. #define COLOR_GREENYELLOW 0xADFF2FAA
  40. #define COLOR_INDIGO 0x4B00B0AA
  41. #define COLOR_IVORY 0xFFFF82AA
  42. #define COLOR_LAWNGREEN 0x7CFC00AA
  43. #define COLOR_SEAGREEN 0x20B2AAAA
  44. #define COLOR_LIMEGREEN 0x32CD32AA
  45. #define COLOR_MIDNIGHTBLUE 0x191970AA
  46. #define COLOR_MAROON 0x800000AA
  47. #define COLOR_OLIVE 0x808000AA
  48. #define COLOR_ORANGERED 0xFF4500AA
  49. #define COLOR_PINK 0xFFC0CBAA
  50. #define COLOR_SPRINGGREEN 0x00FF7FAA
  51. #define COLOR_TOMATO 0xFF6347AA
  52. #define COLOR_YELLOWGREEN 0x9ACD32AA
  53. #define COLOR_MEDIUMAQUA 0x83BFBFAA
  54. #define COLOR_MEDIUMMAGENTA 0x8B008BAA
  55. #define yellow 0xFFFF00AA
  56. #define red 0xFF0000AA
  57. #define green 0x33FF33AA
  58. #define COLOR_CWHITE 0xE0FFFFAA
  59. #define COLOR_TUT 0xF6C861AA
  60. #define COLOR_ROYAL 0x00C1F6AA
  61. #define COLOR_SEXY 0x562ECDFF
  62. #define INACTIVE_PLAYER_ID 255
  63. #define ADMIN_RED 0xFB0000FF
  64. #define YELLOW 0xFFFF00FF
  65. #define ORANGE 0xF97804FF
  66. #define LIGHTRED 0xFF8080FF
  67. #define LIGHTBLUE 0x00C2ECFF
  68. #define PURPLE 0xB360FDFF
  69. #define BLUE 0x1229FAFF
  70. #define LIGHTGREEN 0x38FF06FF
  71. #define DARKPINK 0xE100E1FF
  72. #define NICESKY 0x99FFFFAA
  73. #define GRAY 0xCECECEFF
  74. #define ThePink 0xffa0ffff //
  75. #define TheYellow 0xffa000ff //aka green :))
  76. #define TheBlue 0x2ba0ffff
  77. #define COLOR_YELLOW 0xFFFF00AA
  78. #define COLOR_DARKGOLD 0x808000AA
  79. //New
  80. new flyjobrunning = 0;
  81. new truckjobrunning = 0;
  82. new policejobrunning = 0;
  83.  
  84. AntiDeAMX()
  85. {
  86. new a[][] =
  87. {
  88. "Unarmed (Fist)",
  89. "Brass K"
  90. };
  91. #pragma unused a
  92. }
  93.  
  94. public OnFilterScriptInit()
  95. {
  96. AntiDeAMX();
  97. //0.3c Objects
  98. CreateObject(18750,-5355.25,9451.62,-4546.00,0.00,0.00,0.00);
  99. CreateObject(18752,-10.70,1905.66,19.00,0.00,0.00,0.00);
  100. CreateObject(18750,206.08,1930.14,55.00,91.00,-352.00,-11.00);
  101. //Vinewood
  102. CreateObject(18750, 1412.75, -810.56, 92.86, 90.00, 0.00, 0.00);
  103. CreateObject(2887, 1428.32, -839.42, 51.77, 41.00, 0.00, 317.79);
  104. CreateObject(18656, 1428.45, -839.24, 51.82, 47.00, 0.00, 317.44);
  105. CreateObject(2888, 1428.25, -839.47, 51.72, 41.00, 0.00, 320.00);
  106. CreateObject(18656, 1408.94, -841.75, 51.82, 47.00, 0.00, 47.00);
  107. CreateObject(2887, 1408.99, -841.90, 52.07, 41.00, 0.00, 38.48);
  108. CreateObject(2888, 1408.67, -841.64, 52.43, 41.00, 0.00, 41.69);
  109. //Vehicles
  110. AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //Shamal
  111. AddStaticVehicle(411,2074.7217,-2121.5066,13.3707,270.4157,116,1); //
  112. AddStaticVehicle(411,2065.8503,-2121.5710,13.3679,270.3890,116,1); //
  113. AddStaticVehicle(411,2085.5073,-2121.6392,13.3711,267.6290,116,1); //
  114. //
  115. AddStaticVehicleEx(455,-43.9742,-1155.8762,1.4823,65.0184,-1,-1, 10);
  116. AddStaticVehicleEx(455,-39.6336,-1148.4509,1.5148,62.2225,-1,-1, 10);
  117. AddStaticVehicleEx(455,-37.7033,-1144.2280,1.5173,65.7564,-1,-1, 10);
  118. AddStaticVehicleEx(455,-35.7032,-1140.0637,1.5149,66.4882,-1,-1, 10);
  119. AddStaticVehicleEx(455,-41.9300,-1152.2032,1.5132,62.4657,-1,-1, 10);
  120. AddStaticVehicleEx(420,2148.93212891,1408.98608398,10.67031193,0.00000000,-1,-1,15); //Taxi
  121. AddStaticVehicleEx(420,2145.65673828,1409.02917480,10.67031193,0.00000000,-1,-1,15); //Taxi
  122. AddStaticVehicleEx(420,2142.39770508,1409.00488281,10.67031193,0.00000000,-1,-1,15); //Taxi
  123. AddStaticVehicleEx(420,2139.11596680,1408.97863770,10.67031193,0.00000000,-1,-1,15); //Taxi
  124. AddStaticVehicleEx(420,2135.99462891,1409.09082031,10.67031193,0.00000000,-1,-1,15); //Taxi
  125. AddStaticVehicleEx(420,2123.23413086,1409.12023926,10.66251659,0.00000000,-1,-1,15); //Taxi
  126. AddStaticVehicleEx(420,2120.05761719,1408.85949707,10.66251659,0.00000000,-1,-1,15); //Taxi
  127. AddStaticVehicleEx(420,2117.08544922,1409.02502441,10.67031193,0.00000000,-1,-1,15); //Taxi
  128. AddStaticVehicleEx(420,2113.62695312,1409.09594727,10.67031193,0.00000000,-1,-1,15); //Taxi
  129. AddStaticVehicleEx(420,2110.39794922,1408.97180176,10.67031193,0.00000000,-1,-1,15); //Taxi
  130. AddStaticVehicleEx(420,2129.49902344,1420.17590332,10.66251659,0.00000000,-1,-1,15); //Taxi
  131. AddStaticVehicleEx(597,-1611.73681641,673.07519531,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
  132. AddStaticVehicleEx(597,-1606.18786621,673.08081055,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
  133. AddStaticVehicleEx(597,-1600.14184570,672.95513916,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
  134. AddStaticVehicleEx(597,-1594.09460449,672.76324463,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
  135. AddStaticVehicleEx(597,-1587.93945312,673.17572021,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
  136. AddStaticVehicleEx(597,-1581.94079590,673.12640381,7.05749989,180.00000000,-1,-1,15); //Police Car (SFPD)
  137. AddStaticVehicleEx(597,-1576.38769531,673.00866699,7.06012249,180.00000000,-1,-1,15); //Police Car (SFPD)
  138. AddStaticVehicleEx(599,-1581.75122070,652.41302490,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  139. AddStaticVehicleEx(599,-1587.63500977,652.65301514,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  140. AddStaticVehicleEx(599,-1593.40234375,651.91796875,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  141. AddStaticVehicleEx(599,-1599.54626465,652.15393066,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  142. AddStaticVehicleEx(599,-1605.09851074,651.70568848,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  143. AddStaticVehicleEx(599,-1610.79370117,651.53314209,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  144. AddStaticVehicleEx(599,-1616.49377441,651.57092285,7.57262659,0.00000000,-1,-1,15); //Police Ranger
  145. AddStaticVehicleEx(497,-1629.95520020,655.47644043,7.45250034,0.00000000,-1,-1,15); //Police Maverick
  146. AddStaticVehicleEx(497,-1633.92419434,670.29919434,7.45250034,0.00000000,-1,-1,15); //Police Maverick
  147.  
  148. }
  149.  
  150. public OnPlayerCommandText(playerid, cmdtext[])
  151. {
  152. if (strcmp("/policem", cmdtext, true, 10) == 0)
  153. {
  154. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597)
  155. {
  156. policejobrunning = 1;
  157. SetPlayerCheckpoint(playerid, -1638.6205,1205.9679,8.1736, 10);
  158. GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
  159. SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Job]:Someone stoled an Turismo go there to search for clues!");
  160. new name[MAX_PLAYER_NAME], string[48];
  161. GetPlayerName(playerid, name, sizeof(name));
  162. format(string, sizeof(string), "%s is now a Police Men.[Job]:/jobs", name );
  163. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  164.  
  165. return 1;
  166. }
  167. SendClientMessage(playerid, COLOR_RED,"You have to be in a police car to start the job");
  168. }
  169. if (strcmp("/policem", cmdtext, true, 10) == 0)
  170. {
  171. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599)
  172. {
  173. policejobrunning = 1;
  174. SetPlayerCheckpoint(playerid, -1638.6205,1205.9679,8.1736, 10);
  175. GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
  176. SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Job]:Someone stoled an Turismo go there to search for clues!");
  177. new name[MAX_PLAYER_NAME], string[48];
  178. GetPlayerName(playerid, name, sizeof(name));
  179. format(string, sizeof(string), "%s is now a Police Men.[Job]:/jobs", name );
  180. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  181.  
  182. return 1;
  183. }
  184. SendClientMessage(playerid, COLOR_RED,"You have to be in a police car to start the job");
  185. }
  186. if (strcmp("/policeinfo", cmdtext, true, 10) == 0)
  187. {
  188. SendClientMessage(playerid, COLOR_YELLOW, "You need to go with the police car to the destination.");
  189. SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
  190. SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /policejob and a red marker will appear.");
  191. SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the marker and you're done.");
  192. return 1;
  193. }
  194. if (strcmp("/truckm", cmdtext, true, 10) == 0)
  195. {
  196. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
  197. {
  198. truckjobrunning = 1;
  199. SetPlayerCheckpoint(playerid, 2058.3142,-2092.4023,9.9832, 10);
  200. GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
  201. new name[MAX_PLAYER_NAME], string[48];
  202. GetPlayerName(playerid, name, sizeof(name));
  203. format(string, sizeof(string), "%s is now a Truck Driver.[Job]:/jobs", name );
  204. SendClientMessageToAll(COLOR_RED, string);
  205.  
  206. return 1;
  207. }
  208. SendClientMessage(playerid, COLOR_RED,"You have to be in a truck to start the job");
  209. }
  210. if (strcmp("/truckinfo", cmdtext, true, 10) == 0)
  211. {
  212. SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the truckload to the airport.");
  213. SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
  214. SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /truckjob and a red marker will appear.");
  215. SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the marker and you're done.");
  216. return 1;
  217. }
  218. if (strcmp("/flym", cmdtext, true, 10) == 0)
  219. {
  220. flyjobrunning = 1;
  221. SetPlayerCheckpoint(playerid, -1253.9714,238.6661,14.1484, 10);
  222. GameTextForPlayer(playerid, "~g~You started the Fly Job, good luck!", 3000, 3);
  223. new name[MAX_PLAYER_NAME], string[48];
  224. GetPlayerName(playerid, name, sizeof(name));
  225. format(string, sizeof(string), "%s is now delivering goods with a plane.[Job]:/jobs", name );
  226. SendClientMessageToAll(COLOR_GREEN, string);
  227. return 1;
  228. }
  229. if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
  230. {
  231. SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the planeload to the airport in San Fierro.");
  232. SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
  233. SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /startflight and a red marker will appear.");
  234. SendClientMessage(playerid, COLOR_YELLOW, "Just fly to the marker and you're done.");
  235. return 1;
  236. }
  237. return 0;
  238. }
  239.  
  240. public OnPlayerEnterCheckpoint(playerid)
  241. {
  242. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  243. {
  244. GivePlayerMoney(playerid, 15000);
  245. SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
  246. GameTextForPlayer(playerid, "~g~You Completed the job, well done!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
  247. SetVehicleToRespawn(1);
  248. DisablePlayerCheckpoint(playerid);
  249. flyjobrunning = 0;
  250. SetPlayerPos(playerid, 1729.8932,-2415.7798,14.4727);
  251. }
  252. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
  253. {
  254. GivePlayerMoney(playerid, 10000);
  255. SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
  256. GameTextForPlayer(playerid, "~g~You Completed the job, well done!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
  257. SetVehicleToRespawn(513);
  258. DisablePlayerCheckpoint(playerid);
  259. truckjobrunning = 0;
  260. }
  261. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 597)//police
  262. {
  263. GivePlayerMoney(playerid, 20000);
  264. SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
  265. GameTextForPlayer(playerid, "~r~Well you catch the ~b~thief ~r~in action!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
  266. SetVehicleToRespawn(513);
  267. DisablePlayerCheckpoint(playerid);
  268. policejobrunning = 0;
  269. SetPlayerPos(playerid,-1598.8545,666.7024,7.1875);
  270. }
  271. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 599)//police
  272. {
  273. GivePlayerMoney(playerid, 20000);
  274. SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
  275. GameTextForPlayer(playerid, "~r~Well Done you catch the ~b~thief ~r~in action!~g~~n~Win:1000$+ 10 Score!", 4500, 3);
  276. SetVehicleToRespawn(513);
  277. DisablePlayerCheckpoint(playerid);
  278. policejobrunning = 0;
  279. SetPlayerPos(playerid,-1598.8545,666.7024,7.1875);
  280. }
  281. }
  282. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  283. {
  284. if(GetVehicleModel(vehicleid)== 597)
  285. {
  286. GameTextForPlayer(playerid, "Start: ~l~/~b~policem", 3800, 6);
  287. }
  288. if(GetVehicleModel(vehicleid)== 599)
  289. {
  290. GameTextForPlayer(playerid, "Start: ~l~/~b~policem", 3800, 6);
  291. }
  292. if(GetVehicleModel(vehicleid)== 519)
  293. {
  294. GameTextForPlayer(playerid, "Start: ~l~/~p~flym", 3800, 6);
  295. }
  296. if(GetVehicleModel(vehicleid)== 455)
  297. {
  298. GameTextForPlayer(playerid, "Start: ~l~/~r~truckm", 3800, 6);
  299. }
  300. return 1;
  301. }
  302. public OnPlayerExitVehicle(playerid, vehicleid)
  303. {
  304. if((policejobrunning) == 1)
  305. {
  306. policejobrunning = 0;
  307. SendClientMessage(playerid, COLOR_RED, "You left the Police Car, you failed the job.");
  308.  
  309. }else if((flyjobrunning) == 0){
  310.  
  311. //Nothing
  312. }
  313. if((flyjobrunning) == 1)
  314. {
  315. flyjobrunning = 0;
  316. SendClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");
  317.  
  318. }else if((flyjobrunning) == 0){
  319.  
  320. //Nothing
  321. }
  322. if((truckjobrunning) == 1)
  323. {
  324. truckjobrunning = 0;
  325. SendClientMessage(playerid, COLOR_RED, "You left your truck behind, get in again if you want to continue your job.");
  326.  
  327. }else if((truckjobrunning) == 0){
  328.  
  329. //Nothing
  330. }
  331. }
  332.  
  333. /////===============================================[Ionutz]==========================================================================================/////
  334. /////=============================================[The End!?]========================================================================================/////
  335. /////===============================================[Ionutz]==========================================================================================/////
  336. /////======================================[Site:www.darkstrike.info]================================================================================/////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement