Advertisement
Guest User

crash_trackman

a guest
Apr 24th, 2009
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.61 KB | None | 0 0
  1. //do not change!!!
  2. #include <a_samp>
  3. #include <cps>
  4. #include <colours>
  5. #include <dcmd>
  6.  
  7.  
  8.  
  9. //uncomment the line below to activate LS Airport
  10. #define ls
  11. #define LSPRICE 250 // the price to enter LS Airport
  12.  
  13. //uncomment the line below to activate SF Airport
  14. #define sf
  15. #define SFPRICE 250 // the price to enter SF Airport
  16.  
  17. //uncomment the line below to activate LV Airport
  18. #define lv
  19. #define LVPRICE 250 // the price to enter LV Airport
  20.  
  21. //do not change!!!
  22. new gate1;
  23. new gate2;
  24. new gate3;
  25. new gate4;
  26. new gate5;
  27. new gate6;
  28. new cp1;
  29. new cp2;
  30. new cp3;
  31. new cp4;
  32. new cp5;
  33. new timer1;
  34. new timer2;
  35. forward close(playerid);
  36. forward close2(playerid);
  37. forward close3(playerid);
  38. #define FILTERSCRIPT
  39. #if defined FILTERSCRIPT
  40. public OnFilterScriptInit()
  41. {
  42. StartSystem();
  43. print("\n A [BLS]Touchdown production (FS): ");
  44. print(" The Airport Gates ");
  45. print(" Have fun with this FS! \n ");
  46. if(defined ls)
  47. {
  48. new string[256];
  49. print("LS Airport Gates has been created!");
  50. format(string, sizeof(string), "Price to enter is %d", LSPRICE);
  51. print(string);
  52. print("----------------------------------");
  53. gate1 = CreatePlayerObject(-1, 988, 1958.777588, -2189.858154, 13.585938, 0.0000, 0.0000, 180.0000);
  54. gate2 = CreatePlayerObject(-1, 988, 1964.325195, -2189.832764, 13.585938, 0.0000, 0.0000, 180.0000);
  55. CreateObject(986, 1571.236084, -2659.447754, 16.260414, 0.0000, 0.0000, 0.0000);
  56. CreateObject(986, 1563.292969, -2659.226563, 16.306736, 0.0000, 0.0000, 0.0000);
  57. CreateObject(986, 1555.208374, -2659.226563, 16.274569, 0.0000, 0.0000, 0.0000);
  58. CreateObject(986, 1547.089478, -2659.238281, 16.260414, 0.0000, 0.0000, 0.0000);
  59. CreateObject(986, 1538.947632, -2659.226563, 16.267395, 0.0000, 0.0000, 0.0000);
  60. CreateObject(986, 1530.792725, -2659.246094, 16.260414, 0.0000, 0.0000, 0.0000);
  61. CreateObject(986, 1522.754272, -2659.243164, 16.260414, 0.0000, 0.0000, 0.0000);
  62. CreateObject(986, 1514.610229, -2659.238770, 16.293365, 0.0000, 0.0000, 0.0000);
  63. CreateObject(1536, 1829.703125, -2243.784668, 21.760675, 0.0000, 0.0000, 270.0000);
  64. CreateObject(1536, 1812.220703, -2342.461182, 22.730108, 0.0000, 0.0000, 0.0000);
  65. CreateObject(8613, 1890.906616, -2261.932861, 16.918297, 0.0000, 0.0000, 56.2500);
  66. CreateObject(1656, 1887.539795, -2256.336182, 20.887722, 0.0000, 0.0000, 56.2500);
  67. CreateObject(1656, 1887.499634, -2256.313965, 21.131943, 0.0000, 0.0000, 56.2500);
  68. CreateObject(1656, 1887.486938, -2256.294434, 21.376163, 0.0000, 0.0000, 56.2500);
  69. CreateObject(1656, 1887.464233, -2256.277588, 21.620384, 0.0000, 0.0000, 56.2500);
  70. CreateObject(1656, 1887.822266, -2256.532959, 20.802073, 0.0000, 0.0000, 56.2500);
  71. CreateObject(1656, 1887.817261, -2256.544434, 21.046293, 0.0000, 0.0000, 56.2500);
  72. CreateObject(1656, 1887.812500, -2256.557129, 21.290514, 0.0000, 0.0000, 56.2500);
  73. CreateObject(1656, 1888.168091, -2256.762207, 20.698874, 0.0000, 0.0000, 56.2500);
  74. CreateObject(1656, 1888.147705, -2256.763916, 20.943094, 0.0000, 0.0000, 56.2500);
  75. CreateObject(1656, 1888.511597, -2256.996338, 20.595427, 0.0000, 0.0000, 56.2500);
  76. CreateObject(985, 1951.387207, -2181.703857, 17.321568, 0.0000, 0.0000, 270.0000);
  77. CreateObject(985, 1951.387207, -2185.828613, 17.251568, 0.0000, 0.0000, 270.0000);
  78. CreateObject(985, 1947.800659, -2189.878906, 14.257543, 0.0000, 0.0000, 0.0000);
  79. CreateObject(985, 1952.075317, -2189.912598, 14.292016, 0.0000, 0.0000, 0.0000);
  80. CreateObject(985, 1970.880615, -2189.912598, 14.291811, 0.0000, 0.0000, 0.0000);
  81. CreateObject(985, 1971.819702, -2185.860352, 14.257543, 0.0000, 0.0000, 270.0000);
  82. CreateObject(985, 1971.771118, -2180.384766, 14.257543, 0.0000, 0.0000, 270.0000);
  83. CreateObject(987, 1983.420532, -2176.531250, 12.736956, 0.0000, 0.0000, 180.0000);
  84. CreateObject(987, 1995.372559, -2176.536865, 12.696533, 0.0000, 0.0000, 180.0000);
  85. CreateObject(987, 2007.426636, -2176.509033, 12.546875, 0.0000, 0.0000, 180.0000);
  86. CreateObject(987, 2019.349487, -2176.532959, 12.657122, 0.0000, 0.0000, 180.0000);
  87. CreateObject(987, 2031.268066, -2176.543945, 12.631062, 0.0000, 0.0000, 180.0000);
  88. CreateObject(987, 2043.158813, -2176.523926, 12.546875, 0.0000, 0.0000, 180.0000);
  89. CreateObject(987, 2055.236816, -2176.741211, 12.546875, 0.0000, 0.0000, 180.0000);
  90. CreateObject(987, 2067.022461, -2179.215576, 12.540592, 0.0000, 0.0000, 168.7501);
  91. CreateObject(987, 2078.437744, -2181.894043, 12.546875, 0.0000, 0.0000, 168.7500);
  92. CreateObject(987, 2088.352295, -2188.437500, 12.578209, 0.0000, 0.0000, 146.2500);
  93. CreateObject(987, 2098.387939, -2194.584717, 12.546875, 0.0000, 0.0000, 146.2500);
  94. CreateObject(987, 2107.801514, -2201.070801, 12.546874, 0.0000, 0.0000, 146.2500);
  95. CreateObject(987, 2115.625000, -2209.632568, 12.546875, 0.0000, 0.0000, 135.0000);
  96. CreateObject(987, 2124.074951, -2218.079834, 12.546875, 0.0000, 0.0000, 135.0000);
  97. CreateObject(987, 2127.910156, -2221.894287, 12.546875, 0.0000, 0.0000, 135.0000);
  98. CreateObject(987, 1951.490601, -2176.318359, 12.554207, 0.0000, 0.0000, 180.0000);
  99. CreateObject(987, 1939.505371, -2176.523438, 12.589011, 0.0000, 0.0000, 180.0000);
  100. CreateObject(987, 1927.591797, -2176.424805, 12.546875, 0.0000, 0.0000, 180.0000);
  101. CreateObject(987, 1915.442627, -2176.363037, 12.546877, 0.0000, 0.0000, 180.0000);
  102. CreateObject(987, 1903.516113, -2176.438721, 12.546875, 0.0000, 0.0000, 180.0000);
  103. CreateObject(987, 1891.526001, -2176.461182, 12.546875, 0.0000, 0.0000, 180.0000);
  104. CreateObject(987, 1879.591553, -2176.356689, 12.546875, 0.0000, 0.0000, 180.0000);
  105. CreateObject(987, 1867.468628, -2176.484863, 12.546876, 0.0000, 0.0000, 180.0000);
  106. CreateObject(987, 1855.531860, -2176.461914, 12.546874, 0.0000, 0.0000, 180.0000);
  107. CreateObject(987, 1843.503906, -2176.523438, 12.623022, 0.0000, 0.0000, 180.0000);
  108. CreateObject(987, 1831.477417, -2176.508545, 12.546875, 0.0000, 0.0000, 180.0000);
  109. CreateObject(987, 1819.632324, -2176.523438, 12.596890, 0.0000, 0.0000, 180.0000);
  110. CreateObject(987, 1807.630249, -2176.316650, 12.546875, 0.0000, 0.0000, 180.0000);
  111. CreateObject(986, 1802.984253, -2180.440918, 14.265355, 0.0000, 0.0000, 270.0000);
  112. CreateObject(986, 2125.101807, -2224.961914, 14.264680, 0.0000, 0.0000, 45.0000);
  113. CreateObject(2792, 1829.703125, -2245.027588, 24.721552, 0.0000, 0.0000, 270.0000);
  114. CreateObject(3666, 1830.056763, -2246.810791, 22.263296, 0.0000, 0.0000, 0.0000);
  115. CreateObject(3666, 1829.984741, -2242.369629, 22.263296, 0.0000, 0.0000, 0.0000);
  116. cp1 = CreateCheckpoint(-1, 1957.6169,-2181.4404,13.5469, 3, 15);
  117. cp2 = CreateCheckpoint(-1, 1831.1742,-2244.5115,22.7496, 2, 30);
  118. cp3 = CreateCheckpoint(-1, 1812.8190,-2342.0168,23.6862, 2, 15);
  119. }
  120.  
  121. if(defined sf)
  122. {
  123. new string[256];
  124. print("SF Airport Gates has been created!");
  125. format(string, sizeof(string), "Price to enter is %d", SFPRICE);
  126. print(string);
  127. print("----------------------------------");
  128. gate3 = CreatePlayerObject(-1, 988, -1547.526123, -428.831879, 6.046706, 0.0000, 0.0000, 315.0000);
  129. gate4 = CreatePlayerObject(-1, 988, -1543.636719, -432.726685, 6.039063, 0.0000, 0.0000, 315.0000);
  130. CreateObject(988, -1228.211182, 58.844543, 14.169550, 0.0000, 0.0000, 225.0001);
  131. CreateObject(988, -1218.123169, 68.877289, 14.169569, 0.0000, 0.0000, 225.0000);
  132. cp4 = CreateCheckpoint(-1, -1545.8153,-442.4682,6.0000, 3, 15);
  133. }
  134.  
  135. if(defined lv)
  136. {
  137. new string[256];
  138. print("LV Airport Gates has been created!");
  139. format(string, sizeof(string), "Price to enter is %d", LVPRICE);
  140. print(string);
  141. print("----------------------------------");
  142. gate5 = CreatePlayerObject(-1, 988, 1705.212158, 1605.069458, 10.131485, 0.0000, 359.1406, 70.0783);
  143. gate6 = CreatePlayerObject(-1, 988, 1706.793823, 1610.260864, 10.054688, 0.0000, 0.0000, 72.6566);
  144. CreateObject(985, 1715.284302, 1617.840820, 14.241918, 0.0000, 0.0000, 341.0151);
  145. cp5 = CreateCheckpoint(-1, 1716.9440,1615.6855,10.0864, 3, 15);
  146. }
  147.  
  148.  
  149.  
  150.  
  151. return 1;
  152. }
  153.  
  154. public OnFilterScriptExit()
  155. {
  156. return 1;
  157. }
  158.  
  159. #else
  160.  
  161. main()
  162. {
  163. print("\n----------------------------------");
  164. print(" Blank Gamemode by your name here");
  165. print("----------------------------------\n");
  166. }
  167.  
  168. #endif
  169.  
  170. public OnGameModeInit()
  171. {
  172. return 1;
  173. }
  174.  
  175. public OnGameModeExit()
  176. {
  177. return 1;
  178. }
  179.  
  180. public OnPlayerRequestClass(playerid, classid)
  181. {
  182. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  183. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  184. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  185. return 1;
  186. }
  187.  
  188. public OnPlayerRequestSpawn(playerid)
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerConnect(playerid)
  194. {
  195. ClearVars(playerid);
  196. SyncCheckpoints(playerid);
  197. return 1;
  198. }
  199.  
  200. public OnPlayerDisconnect(playerid, reason)
  201. {
  202. return 1;
  203. }
  204.  
  205. public OnPlayerSpawn(playerid)
  206. {
  207. return 1;
  208. }
  209.  
  210. public OnPlayerDeath(playerid, killerid, reason)
  211. {
  212. return 1;
  213. }
  214.  
  215. public OnVehicleSpawn(vehicleid)
  216. {
  217. return 1;
  218. }
  219.  
  220. public OnVehicleDeath(vehicleid, killerid)
  221. {
  222. return 1;
  223. }
  224.  
  225. public OnPlayerText(playerid, text[])
  226. {
  227. return 1;
  228. }
  229.  
  230. public OnPlayerPrivmsg(playerid, recieverid, text[])
  231. {
  232. return 1;
  233. }
  234.  
  235. public OnPlayerCommandText(playerid, cmdtext[])
  236. {
  237. return 0;
  238. }
  239.  
  240. public OnPlayerInfoChange(playerid)
  241. {
  242. return 1;
  243. }
  244.  
  245. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  246. {
  247. return 1;
  248. }
  249.  
  250. public OnPlayerExitVehicle(playerid, vehicleid)
  251. {
  252. return 1;
  253. }
  254.  
  255. public OnPlayerStateChange(playerid, newstate, oldstate)
  256. {
  257. return 1;
  258. }
  259.  
  260. public OnPlayerEnterCheckpoint(playerid)
  261. {
  262. CheckpointCheck(playerid);
  263. return 1;
  264. }
  265.  
  266. public OnPlayerLeaveCheckpoint(playerid)
  267. {
  268. return 1;
  269. }
  270.  
  271. public OnPlayerEnterRaceCheckpoint(playerid)
  272. {
  273. return 1;
  274. }
  275.  
  276. public OnPlayerLeaveRaceCheckpoint(playerid)
  277. {
  278. return 1;
  279. }
  280.  
  281. public OnRconCommand(cmd[])
  282. {
  283. return 1;
  284. }
  285.  
  286. public OnObjectMoved(objectid)
  287. {
  288. return 1;
  289. }
  290.  
  291. public OnPlayerObjectMoved(playerid, objectid)
  292. {
  293. return 1;
  294. }
  295.  
  296. public OnPlayerPickUpPickup(playerid, pickupid)
  297. {
  298. return 1;
  299. }
  300.  
  301. public OnPlayerSelectedMenuRow(playerid, row)
  302. {
  303. return 1;
  304. }
  305.  
  306. public OnPlayerExitedMenu(playerid)
  307. {
  308. return 1;
  309. }
  310.  
  311. public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
  312. {
  313. if(streamid == cp1)
  314. {
  315. if(GetPlayerMoney(playerid) >= LSPRICE)
  316. {
  317. new string[256];
  318. GivePlayerMoney(playerid, -LSPRICE);
  319. format(string, sizeof(string), "You have paid %d$ to enter airport", LSPRICE);
  320. SendClientMessage(playerid, GREEN, string);
  321. MovePlayerObject(playerid, gate1, 1953.942017, -2189.912598, 13.620567, 2.5);
  322. MovePlayerObject(playerid, gate2, 1969.518311, -2190.141846, 13.585938, 2.5);
  323. timer1 = SetTimer("close", 7500, false);
  324. return true;
  325. }
  326. else
  327. {
  328. new string[256];
  329. format(string, sizeof(string), "You havent got enough money! It costs %d!", LSPRICE);
  330. SendClientMessage(playerid, RED, string);
  331. return false;
  332. }
  333. }
  334. else if(streamid == cp2)
  335. {
  336. SetPlayerPos(playerid, 1812.9651,-2337.7554,23.6864);
  337. return true;
  338. }
  339. else if(streamid == cp3)
  340. {
  341. SetPlayerPos(playerid, 1834.3066,-2245.0669,22.7496);
  342. return 1;
  343. }
  344. else if(streamid == cp4)
  345. {
  346. if(GetPlayerMoney(playerid) >= SFPRICE)
  347. {
  348. new string[256];
  349. GivePlayerMoney(playerid, -SFPRICE);
  350. format(string, sizeof(string), "You have paid %d$ to enter airport", SFPRICE);
  351. SendClientMessage(playerid, GREEN, string);
  352. MovePlayerObject(playerid, gate3, -1551.229614, -425.049896, 6.045845, 2.5);
  353. MovePlayerObject(playerid, gate4, -1539.968750, -436.327332, 6.039063, 2.5);
  354. timer2 = SetTimer("close2", 7500, false);
  355. return true;
  356. }
  357. else
  358. {
  359. new string[256];
  360. format(string, sizeof(string), "You havent got enough money! It costs %d!", SFPRICE);
  361. SendClientMessage(playerid, RED, string);
  362. return false;
  363. }
  364. }
  365. else if(streamid == cp5)
  366. {
  367. if(GetPlayerMoney(playerid) >= LVPRICE)
  368. {
  369. new string[256];
  370. GivePlayerMoney(playerid, -LVPRICE);
  371. format(string, sizeof(string), "You have paid %d$ to enter airport", LVPRICE);
  372. SendClientMessage(playerid,GREEN, string);
  373. MovePlayerObject(playerid, gate5, 1703.661743, 1599.855347, 10.117695, 2.5);
  374. MovePlayerObject(playerid, gate6, 1708.524292, 1615.568257, 10.075083, 2.5);
  375. SetTimer("close3", 7500, false);
  376. }
  377. else
  378. {
  379. new string[256];
  380. format(string, sizeof(string), "You havent got enough money! It costs %d!", LVPRICE);
  381. SendClientMessage(playerid, RED, string);
  382. return false;
  383. }
  384. }
  385.  
  386.  
  387. return 1;
  388. }
  389. public close(playerid)
  390. {
  391. MovePlayerObject(playerid, gate1, 1958.777588, -2189.858154, 13.585938, 2.5);
  392. MovePlayerObject(playerid, gate2, 1964.325195, -2189.832764, 13.585938, 2.5);
  393. KillTimer(timer1);
  394. return 1;
  395. }
  396.  
  397. public close2(playerid)
  398. {
  399. MovePlayerObject(playerid, gate3, -1547.526123, -428.831879, 6.046706, 2.5);
  400. MovePlayerObject(playerid, gate4, -1543.636719, -432.726685, 6.039063, 2.5);
  401. KillTimer(timer2);
  402. return 1;
  403. }
  404.  
  405. public close3(playerid)
  406. {
  407. MovePlayerObject(playerid, gate5, 1705.212158, 1605.069458, 10.131485, 2.5);
  408. MovePlayerObject(playerid, gate6, 1706.793823, 1610.260864, 10.054688, 2.5);
  409. return 1;
  410. }
  411.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement