Advertisement
Guest User

FS AEROPORTO BY: LUCAS_SCRIPT, DAR_SCRIPT, CAIO_SCRIPT v1.0

a guest
Dec 7th, 2013
2,646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.81 KB | None | 0 0
  1. /*
  2. ________________________________________________________________________
  3. ________________________________________________________________________
  4. || ||
  5. || FS TAM EXPRESS BY: LUCAS_SCRIPT DARK_SCRIPT CAIO_SCRIPT v1.0 ||
  6. || ||
  7. || ||
  8. || FS FEITO A PEDIDO DE WESLLEY_SCRIPT ||
  9. || ||
  10. || ||
  11. || ||
  12. || Não Retire os Créditos se não o pau vai comer !!! ||
  13. || ||
  14. ________________________________________________________________________
  15. ________________________________________________________________________
  16. */
  17. #define FILTERSCRIPT
  18. //====Cores=====/
  19. #define COLOR_LIGHTBLUE 0x33CCFFAA
  20. #define COLOR_GRAD1 0xB4B5B7FF
  21. #define COLOR_RED 0xAA3333AA
  22. #define COR_ROXO 0x9932CCFF
  23. //=====Include=====//
  24. #include <a_samp>
  25. //===============//
  26. #if defined FILTERSCRIPT
  27.  
  28. new PassagemLS[MAX_PLAYERS];
  29. new PassagemLB[MAX_PLAYERS];
  30. new PassagemLV[MAX_PLAYERS];
  31. new PassagemSF[MAX_PLAYERS];
  32. new pembarque[MAX_PLAYERS];
  33. new pembarcado[MAX_PLAYERS];
  34. new pagendado[MAX_PLAYERS];
  35. new TempoAgendado;
  36. new TempoEmbarque;
  37. new TempoEmbarcado;
  38.  
  39. stock IsPlayerInSF(playerid)
  40. {
  41. new Float:x,Float:y,Float:z;
  42. GetPlayerPos(playerid, x, y, z);
  43. if(x >= -2954.502 && y >= -3012.892 && x <= -957.5858 && y <= 1436.379) return 1;
  44. else return 0;
  45. }
  46. stock IsPlayerInLosSantos(playerid)
  47. {
  48. new Float:x,Float:y,Float:z;
  49. GetPlayerPos(playerid, x, y, z);
  50. if(x >= -922.5522 && y >= -2791.012 && x <= 2954.502 && y <= 385.3699) return 1;
  51. else return 0;
  52. }
  53. stock IsPlayerInLV(playerid)
  54. {
  55. new Float:x,Float:y,Float:z;
  56. GetPlayerPos(playerid, x, y, z);
  57. if(x >= -1307.922 && y >= 490.4708 && x <= 2977.858 && y <= 3153.026) return 1;
  58. else return 0;
  59. }
  60. public OnFilterScriptInit()
  61. {
  62. print("=================================================================");
  63. print("FileScript Feito By: Lucas_Script, Dark_Script, Caio_Script !!!");
  64. print("Agradecimento à: Weslley_Script e toda a equipe da SSGames !!!");
  65. print("=================================================================");
  66. return 1;
  67. }
  68.  
  69. public OnFilterScriptExit()
  70. {
  71. print("=================================================================");
  72. print(" FileScript Desligado ");
  73. print("FileScript Feito By: Lucas_Script, Dark_Script, Caio_Script !!!");
  74. print("Agradecimento à: Weslley_Script e toda a equipe da SSGames !!!");
  75. print(" FileScript Desligado ");
  76. print("=================================================================");
  77. return 1;
  78. }
  79.  
  80. public OnPlayerConnect(playerid)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerDisconnect(playerid, reason)
  86. {
  87. return 1;
  88. }
  89. public OnGameModeInit()
  90. {
  91. //======================Textos=================//
  92. Create3DTextLabel("Aeroporto\nLos Santos",COLOR_RED,1820.6246,-2403.4546,16.3438,15.0,0);
  93. Create3DTextLabel("Aeroporto\nSan Fierro",COLOR_RED,-1421.2096,-287.2144,14.1484,15.0,0);
  94. Create3DTextLabel("Aeroporto\nLas Venturas",COLOR_RED,1679.0310,1509.3196,10.7741,15.0,0);
  95. Create3DTextLabel("Aeroporto\nLibert City",COLOR_RED,-777.8772,505.1375,1376.5930,15.0,0);
  96. //======================Pickups================//
  97. AddStaticPickup(1239, 23, 1820.6246,-2403.4546,16.3438);
  98. AddStaticPickup(1239, 23, -1421.2096,-287.2144,14.1484);
  99. AddStaticPickup(1239, 23, 1679.0310,1509.3196,10.7741);
  100. AddStaticPickup(1239, 23, -777.8772,505.1375,1376.5930);
  101. //======================Aero LS===============//
  102. CreateObject(3271, 1727.19995, -2432.80005, 13.5, 0, 0, 208);
  103. CreateObject(17533, 1816, -2414.69995, 43, 0, 0, 272.5);
  104. CreateObject(3663, 1827.90002, -2491.1001, 14.6, 0, 0, 90);
  105. CreateObject(7980, 1819.40002, -2452.3999, 14.5, 0, 0, 0);
  106. CreateObject(3472, 1795.90002, -2436.69995, 17.2, 0, 0, 0);
  107. CreateObject(3472, 1846.09998, -2434.69995, 16.4, 0, 0, 0);
  108. CreateObject(3472, 1822.5, -2435.30005, 16.4, 0, 0, 0);
  109. CreateObject(645, 1835.90002, -2439.3999, 12.6, 0, 0, 0);
  110. CreateObject(645, 1809.30005, -2439.8999, 12.6, 0, 0, 0);
  111. CreateObject(5130, 1854.69995, -2416.6001, 15.5, 0, 0, 316.25);
  112. CreateObject(1683, 1808.19995, -2493.30005, 18.5, 0, 0, 0);
  113. CreateObject(1682, 1850.40002, -2444.3999, 19, 0, 0, 136);
  114. CreateObject(4726, 1729.90002, -2435.30005, 12.3, 0, 0, 350.75);
  115. CreateObject(2797, 1820.30005, -2406.30005, 22.6, 0, 0, 0);
  116. CreateObject(2794, 1808.09998, -2421.30005, 21.8, 0, 0, 0);
  117. CreateObject(2792, 1830.59998, -2420.19995, 20.9, 0, 0, 0);
  118. CreateObject(1215, 1835.19995, -2464.1001, 13.1, 0, 0, 0);
  119. CreateObject(1215, 1834.90002, -2454.80005, 13.1, 0, 0, 0);
  120. CreateObject(1215, 1834.80005, -2444.8999, 13.1, 0, 0, 0);
  121. CreateObject(1215, 1804, -2445.30005, 13.1, 0, 0, 0);
  122. CreateObject(1215, 1804.09998, -2455, 13.1, 0, 0, 0);
  123. CreateObject(1215, 1804.30005, -2464.6001, 13.1, 0, 0, 0);
  124. CreateObject(1216, 1830, -2420.5, 16, 0, 0, 0);
  125. //===================Aero LV====================//
  126. CreateObject(9833, 1691.19995, 1448.30005, 13, 0, 0, 0);
  127. ///=================Aero LB====================//
  128. CreateObject(4726, -789.70001, 495.10001, 1379.5, 0, 0, 4);
  129. CreateObject(3271, -792.29999, 496.89999, 1380.80005, 0, 0, 200);
  130. return 1;
  131. }
  132.  
  133. public OnPlayerCommandText(playerid, cmdtext[])
  134. {
  135. if (strcmp("/cpassagem", cmdtext, true, 10) == 0)
  136. {
  137. if(!PlayerToPoint(2.0,playerid,1820.6246,-2403.4546,16.3438) && !PlayerToPoint(2.0,playerid,-1421.2096,-287.2144,14.1484) && !PlayerToPoint(2.0,playerid,1679.0310,1509.3196,10.7741) && !PlayerToPoint(2.0,playerid,-777.8772,505.1375,1376.5930))
  138. {
  139. SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
  140. return 1;
  141. }
  142. TogglePlayerControllable(playerid, 0);
  143. ShowPlayerDialog(playerid,7500,DIALOG_STYLE_LIST,"TAM EXPRESS - PASSAGENS","Los Santos\nLibert City\nLas Venturas\nSan Fierro","Comprar","Cancelar");
  144. return 1;
  145. }
  146. if (strcmp("/viajar", cmdtext, true, 10) == 0)
  147. {
  148. if(!PlayerToPoint(2.0,playerid,1820.6246,-2403.4546,16.3438) && !PlayerToPoint(2.0,playerid,-1421.2096,-287.2144,14.1484) && !PlayerToPoint(2.0,playerid,1679.0310,1509.3196,10.7741) && !PlayerToPoint(2.0,playerid,-777.8772,505.1375,1376.5930))
  149. {
  150. SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
  151. return 1;
  152. }
  153. if(PassagemSF[playerid] != 1 && PassagemLS[playerid] != 1 && PassagemLB[playerid] != 1 && PassagemLV[playerid] != 1)
  154. {
  155. SendClientMessage(playerid, COLOR_GRAD1, "Você não tem uma passagem !");
  156. return 1;
  157. }
  158. if(IsPlayerInLosSantos(playerid) && PassagemLS[playerid] == 1)
  159. {
  160. SendClientMessage(playerid, COLOR_GRAD1, "O sr. não pode viajar para los santos pois já está nela.");
  161. PassagemLS[playerid] = 0;
  162. PassagemLB[playerid] = 0;
  163. PassagemLV[playerid] = 0;
  164. PassagemSF[playerid] = 0;
  165. return 1;
  166. }
  167. if(IsPlayerInSF(playerid) && PassagemSF[playerid] == 1)
  168. {
  169. SendClientMessage(playerid, COLOR_GRAD1, "O sr. não pode viajar para san fierro pois já está nela.");
  170. PassagemLS[playerid] = 0;
  171. PassagemLB[playerid] = 0;
  172. PassagemLV[playerid] = 0;
  173. PassagemSF[playerid] = 0;
  174. return 1;
  175. }
  176. if(IsPlayerInLV(playerid) && PassagemLV[playerid] == 1)
  177. {
  178. SendClientMessage(playerid, COLOR_GRAD1, "O sr. não pode viajar para las venturas pois já está nela.");
  179. PassagemLS[playerid] = 0;
  180. PassagemLB[playerid] = 0;
  181. PassagemLV[playerid] = 0;
  182. PassagemSF[playerid] = 0;
  183. return 1;
  184. }
  185. PlayAudioStreamForPlayer(playerid, "https://0c74267d-a-62cb3a1a-s-sites.googlegroups.com/site/brasilplaystark/aero.mp3?");
  186. SetPlayerInterior(playerid, 1);
  187. SetPlayerPos(playerid, 2.5762,33.2962,1199.5938);
  188. pembarcado[playerid] = 1;
  189. TempoEmbarcado = SetTimer("Embarcado", 25000, 0);
  190. SendClientMessage(playerid, COR_ROXO, "Aeromoça Andressa: Por Favor, apertem os cintos decolaremos daqui à alguns segundos !");
  191. SendClientMessage(playerid, COR_ROXO, "Comandante Eliezer: Já estamos decolando, preparem-se !");
  192. KillTimer(TempoEmbarque);
  193. KillTimer(TempoAgendado);
  194. return 1;
  195. }
  196. if (strcmp("/agendarvoo", cmdtext, true, 10) == 0)
  197. {
  198. if(!PlayerToPoint(2.0,playerid,1820.6246,-2403.4546,16.3438) && !PlayerToPoint(2.0,playerid,-1421.2096,-287.2144,14.1484) && !PlayerToPoint(2.0,playerid,1679.0310,1509.3196,10.7741) && !PlayerToPoint(2.0,playerid,-777.8772,505.1375,1376.5930))
  199. {
  200. SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
  201. return 1;
  202. }
  203. if(PassagemSF[playerid] != 1 && PassagemLS[playerid] != 1 && PassagemLB[playerid] != 1 && PassagemLV[playerid] != 1)
  204. {
  205. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Você não tem uma passagem !");
  206. return 1;
  207. }
  208. TogglePlayerControllable(playerid, 0);
  209. ShowPlayerDialog(playerid,7501,DIALOG_STYLE_LIST,"TAM EXPRESS - VOOS","Daqui a 5 minutos\nDaqui a 10 minutos\nDaqui a 30 minutos\nDaqui a 1hora","Agendar","Cancelar");
  210. KillTimer(TempoEmbarque);
  211. return 1;
  212. }
  213. if (strcmp("/ajudavoo", cmdtext, true, 10) == 0)
  214. {
  215. if(!PlayerToPoint(2.0,playerid,1820.6246,-2403.4546,16.3438) && !PlayerToPoint(2.0,playerid,-1421.2096,-287.2144,14.1484) && !PlayerToPoint(2.0,playerid,1679.0310,1509.3196,10.7741) && !PlayerToPoint(2.0,playerid,-777.8772,505.1375,1376.5930))
  216. {
  217. SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
  218. return 1;
  219. }
  220. TogglePlayerControllable(playerid, 0);
  221. ShowPlayerDialog(playerid,5053,DIALOG_STYLE_MSGBOX,"TAM EXPRESS - AJUDA","/cpassagem - Comprar Passagem\n/viajar - Viajar Para o local da passagem\n/agendarvoo - Agendar o Horario do Vôo","Confirmar","Cancelar");
  222. return 1;
  223. }
  224. return 0;
  225. }
  226. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  227. {
  228. TogglePlayerControllable(playerid, 1);
  229. if(dialogid == 7500)
  230. {
  231. TogglePlayerControllable(playerid, 1);
  232. if(response == 0) { return ShowPlayerDialog(playerid,7500,DIALOG_STYLE_LIST,"TAM EXPRESS - PASSAGENS","Los Santos\nLibert City\nLas Venturas\nSan Fierro","Comprar","Cancelar"); }
  233. switch(listitem)
  234. {
  235. case 0:
  236. {
  237. PassagemLS[playerid] = 1;
  238. PassagemLB[playerid] = 0;
  239. PassagemLV[playerid] = 0;
  240. PassagemSF[playerid] = 0;
  241. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para Los Santos !");
  242. SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
  243. pembarque[playerid] = 1;
  244. TempoEmbarque = SetTimer("Embarque", 15000, 0);
  245. }
  246. case 1:
  247. {
  248. PassagemLS[playerid] = 0;
  249. PassagemLB[playerid] = 1;
  250. PassagemLV[playerid] = 0;
  251. PassagemSF[playerid] = 0;
  252. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para Libert City !");
  253. SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
  254. pembarque[playerid] = 1;
  255. TempoEmbarque = SetTimer("Embarque", 15000, 0);
  256. }
  257. case 2:
  258. {
  259. PassagemLS[playerid] = 0;
  260. PassagemLB[playerid] = 0;
  261. PassagemLV[playerid] = 1;
  262. PassagemSF[playerid] = 0;
  263. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para Las Venturas !");
  264. SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
  265. pembarque[playerid] = 1;
  266. TempoEmbarque = SetTimer("Embarque", 15000, 0);
  267. }
  268. case 3:
  269. {
  270. PassagemLS[playerid] = 0;
  271. PassagemLB[playerid] = 0;
  272. PassagemLV[playerid] = 0;
  273. PassagemSF[playerid] = 1;
  274. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para San Fierro !");
  275. SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
  276. pembarque[playerid] = 1;
  277. TempoEmbarque = SetTimer("Embarque", 15000, 0);
  278. }
  279. }
  280. }
  281. if(dialogid == 7501)
  282. {
  283. TogglePlayerControllable(playerid, 1);
  284. if(response == 0) { return ShowPlayerDialog(playerid,7500,DIALOG_STYLE_LIST,"TAM EXPRESS - VOOS","Daqui a 5 minutos\nDaqui a 10 minutos\nDaqui a 30 minutos\nDaqui a 50 minutos","Agendar","Cancelar"); }
  285. switch(listitem)
  286. {
  287. case 0:
  288. {
  289. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
  290. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
  291. pagendado[playerid] = 1;
  292. TempoAgendado = SetTimer("Agendado", 300000, 0);
  293. }
  294. case 1:
  295. {
  296. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
  297. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
  298. pagendado[playerid] = 1;
  299. TempoAgendado = SetTimer("Agendado", 300000, 0);
  300. }
  301. case 2:
  302. {
  303. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
  304. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
  305. pagendado[playerid] = 1;
  306. TempoAgendado = SetTimer("Agendado", 300000, 0);
  307. }
  308. case 3:
  309. {
  310. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
  311. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
  312. pagendado[playerid] = 1;
  313. TempoAgendado = SetTimer("Agendado", 300000, 0);
  314. }
  315. }
  316. }
  317. return 1;
  318. }
  319. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  320. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  321. {
  322. if(IsPlayerConnected(playerid))
  323. {
  324. new Float:oldposx, Float:oldposy, Float:oldposz;
  325. new Float:tempposx, Float:tempposy, Float:tempposz;
  326. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  327. tempposx = (oldposx -x);
  328. tempposy = (oldposy -y);
  329. tempposz = (oldposz -z);
  330. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  331. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  332. {
  333. return true;
  334. }
  335. }
  336. return 0;
  337. }
  338. forward Embarque(playerid);
  339. public Embarque(playerid)
  340. {
  341. if(pembarque[playerid] > 0)
  342. {
  343. PassagemLS[playerid] = 0;
  344. PassagemLB[playerid] = 0;
  345. PassagemLV[playerid] = 0;
  346. PassagemSF[playerid] = 0;
  347. SendClientMessage(playerid, COLOR_LIGHTBLUE, "O sr. não embarcou a tempo e o seu vôo decolou.");
  348. }
  349. return 1;
  350. }
  351. forward Agendado(playerid);
  352. public Agendado(playerid)
  353. {
  354. if(pagendado[playerid] > 0)
  355. {
  356. PassagemLS[playerid] = 0;
  357. PassagemLB[playerid] = 0;
  358. PassagemLV[playerid] = 0;
  359. PassagemSF[playerid] = 0;
  360. SendClientMessage(playerid, COLOR_LIGHTBLUE, "O sr. não compareceu no aeroporto a tempo por isso perdeu suas passagens.");
  361. }
  362. return 1;
  363. }
  364. forward Embarcado(playerid);
  365. public Embarcado(playerid)
  366. {
  367. if(pembarcado[playerid] > 0)
  368. {
  369. if(PassagemLS[playerid] == 1)
  370. {
  371. SetPlayerInterior(playerid, 0);
  372. SetPlayerPos(playerid, 1827.9844,-2492.4976,16.4132);
  373. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
  374. PassagemLS[playerid] = 0;
  375. PassagemLB[playerid] = 0;
  376. PassagemLV[playerid] = 0;
  377. PassagemSF[playerid] = 0;
  378. KillTimer(TempoEmbarcado);
  379. StopAudioStreamForPlayer(playerid);
  380. }
  381. else if(PassagemSF[playerid] == 1)
  382. {
  383. SetPlayerInterior(playerid, 0);
  384. SetPlayerPos(playerid, -1421.2096,-287.2144,14.1484);
  385. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
  386. PassagemLS[playerid] = 0;
  387. PassagemLB[playerid] = 0;
  388. PassagemLV[playerid] = 0;
  389. PassagemSF[playerid] = 0;
  390. KillTimer(TempoEmbarcado);
  391. StopAudioStreamForPlayer(playerid);
  392. }
  393. else if(PassagemLV[playerid] == 1)
  394. {
  395. SetPlayerInterior(playerid, 0);
  396. SetPlayerPos(playerid, 1679.0310,1509.3196,10.7741);
  397. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
  398. PassagemLS[playerid] = 0;
  399. PassagemLB[playerid] = 0;
  400. PassagemLV[playerid] = 0;
  401. PassagemSF[playerid] = 0;
  402. KillTimer(TempoEmbarcado);
  403. StopAudioStreamForPlayer(playerid);
  404. }
  405. else if(PassagemLB[playerid] == 1)
  406. {
  407. SetPlayerInterior(playerid, 1);
  408. SetPlayerPos(playerid, -777.8772,505.1375,1376.5930);
  409. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
  410. PassagemLS[playerid] = 0;
  411. PassagemLB[playerid] = 0;
  412. PassagemLV[playerid] = 0;
  413. PassagemSF[playerid] = 0;
  414. KillTimer(TempoEmbarcado);
  415. StopAudioStreamForPlayer(playerid);
  416. }
  417. }
  418. return 1;
  419. }
  420.  
  421. #endif
  422. /*
  423. ________________________________________________________________________
  424. ________________________________________________________________________
  425. || ||
  426. || FS TAM EXPRESS BY: LUCAS_SCRIPT DARK_SCRIPT CAIO_SCRIPT v1.0 ||
  427. || ||
  428. || ||
  429. || FS FEITO A PEDIDO DE WESLLEY_SCRIPT ||
  430. || ||
  431. || ||
  432. || ||
  433. || Não Retire os Créditos se não o pau vai comer !!! ||
  434. || ||
  435. ________________________________________________________________________
  436. ________________________________________________________________________
  437. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement