Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ________________________________________________________________________
- ________________________________________________________________________
- || ||
- || FS TAM EXPRESS BY: LUCAS_SCRIPT DARK_SCRIPT CAIO_SCRIPT v1.0 ||
- || ||
- || ||
- || FS FEITO A PEDIDO DE WESLLEY_SCRIPT ||
- || ||
- || ||
- || ||
- || Não Retire os Créditos se não o pau vai comer !!! ||
- || ||
- ________________________________________________________________________
- ________________________________________________________________________
- */
- #define FILTERSCRIPT
- //====Cores=====/
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_RED 0xAA3333AA
- #define COR_ROXO 0x9932CCFF
- //=====Include=====//
- #include <a_samp>
- //===============//
- #if defined FILTERSCRIPT
- new PassagemLS[MAX_PLAYERS];
- new PassagemLB[MAX_PLAYERS];
- new PassagemLV[MAX_PLAYERS];
- new PassagemSF[MAX_PLAYERS];
- new pembarque[MAX_PLAYERS];
- new pembarcado[MAX_PLAYERS];
- new pagendado[MAX_PLAYERS];
- new TempoAgendado;
- new TempoEmbarque;
- new TempoEmbarcado;
- stock IsPlayerInSF(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(x >= -2954.502 && y >= -3012.892 && x <= -957.5858 && y <= 1436.379) return 1;
- else return 0;
- }
- stock IsPlayerInLosSantos(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(x >= -922.5522 && y >= -2791.012 && x <= 2954.502 && y <= 385.3699) return 1;
- else return 0;
- }
- stock IsPlayerInLV(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(x >= -1307.922 && y >= 490.4708 && x <= 2977.858 && y <= 3153.026) return 1;
- else return 0;
- }
- public OnFilterScriptInit()
- {
- print("=================================================================");
- print("FileScript Feito By: Lucas_Script, Dark_Script, Caio_Script !!!");
- print("Agradecimento à: Weslley_Script e toda a equipe da SSGames !!!");
- print("=================================================================");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("=================================================================");
- print(" FileScript Desligado ");
- print("FileScript Feito By: Lucas_Script, Dark_Script, Caio_Script !!!");
- print("Agradecimento à: Weslley_Script e toda a equipe da SSGames !!!");
- print(" FileScript Desligado ");
- print("=================================================================");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnGameModeInit()
- {
- //======================Textos=================//
- Create3DTextLabel("Aeroporto\nLos Santos",COLOR_RED,1820.6246,-2403.4546,16.3438,15.0,0);
- Create3DTextLabel("Aeroporto\nSan Fierro",COLOR_RED,-1421.2096,-287.2144,14.1484,15.0,0);
- Create3DTextLabel("Aeroporto\nLas Venturas",COLOR_RED,1679.0310,1509.3196,10.7741,15.0,0);
- Create3DTextLabel("Aeroporto\nLibert City",COLOR_RED,-777.8772,505.1375,1376.5930,15.0,0);
- //======================Pickups================//
- AddStaticPickup(1239, 23, 1820.6246,-2403.4546,16.3438);
- AddStaticPickup(1239, 23, -1421.2096,-287.2144,14.1484);
- AddStaticPickup(1239, 23, 1679.0310,1509.3196,10.7741);
- AddStaticPickup(1239, 23, -777.8772,505.1375,1376.5930);
- //======================Aero LS===============//
- CreateObject(3271, 1727.19995, -2432.80005, 13.5, 0, 0, 208);
- CreateObject(17533, 1816, -2414.69995, 43, 0, 0, 272.5);
- CreateObject(3663, 1827.90002, -2491.1001, 14.6, 0, 0, 90);
- CreateObject(7980, 1819.40002, -2452.3999, 14.5, 0, 0, 0);
- CreateObject(3472, 1795.90002, -2436.69995, 17.2, 0, 0, 0);
- CreateObject(3472, 1846.09998, -2434.69995, 16.4, 0, 0, 0);
- CreateObject(3472, 1822.5, -2435.30005, 16.4, 0, 0, 0);
- CreateObject(645, 1835.90002, -2439.3999, 12.6, 0, 0, 0);
- CreateObject(645, 1809.30005, -2439.8999, 12.6, 0, 0, 0);
- CreateObject(5130, 1854.69995, -2416.6001, 15.5, 0, 0, 316.25);
- CreateObject(1683, 1808.19995, -2493.30005, 18.5, 0, 0, 0);
- CreateObject(1682, 1850.40002, -2444.3999, 19, 0, 0, 136);
- CreateObject(4726, 1729.90002, -2435.30005, 12.3, 0, 0, 350.75);
- CreateObject(2797, 1820.30005, -2406.30005, 22.6, 0, 0, 0);
- CreateObject(2794, 1808.09998, -2421.30005, 21.8, 0, 0, 0);
- CreateObject(2792, 1830.59998, -2420.19995, 20.9, 0, 0, 0);
- CreateObject(1215, 1835.19995, -2464.1001, 13.1, 0, 0, 0);
- CreateObject(1215, 1834.90002, -2454.80005, 13.1, 0, 0, 0);
- CreateObject(1215, 1834.80005, -2444.8999, 13.1, 0, 0, 0);
- CreateObject(1215, 1804, -2445.30005, 13.1, 0, 0, 0);
- CreateObject(1215, 1804.09998, -2455, 13.1, 0, 0, 0);
- CreateObject(1215, 1804.30005, -2464.6001, 13.1, 0, 0, 0);
- CreateObject(1216, 1830, -2420.5, 16, 0, 0, 0);
- //===================Aero LV====================//
- CreateObject(9833, 1691.19995, 1448.30005, 13, 0, 0, 0);
- ///=================Aero LB====================//
- CreateObject(4726, -789.70001, 495.10001, 1379.5, 0, 0, 4);
- CreateObject(3271, -792.29999, 496.89999, 1380.80005, 0, 0, 200);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/cpassagem", cmdtext, true, 10) == 0)
- {
- 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))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
- return 1;
- }
- TogglePlayerControllable(playerid, 0);
- ShowPlayerDialog(playerid,7500,DIALOG_STYLE_LIST,"TAM EXPRESS - PASSAGENS","Los Santos\nLibert City\nLas Venturas\nSan Fierro","Comprar","Cancelar");
- return 1;
- }
- if (strcmp("/viajar", cmdtext, true, 10) == 0)
- {
- 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))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
- return 1;
- }
- if(PassagemSF[playerid] != 1 && PassagemLS[playerid] != 1 && PassagemLB[playerid] != 1 && PassagemLV[playerid] != 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não tem uma passagem !");
- return 1;
- }
- if(IsPlayerInLosSantos(playerid) && PassagemLS[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "O sr. não pode viajar para los santos pois já está nela.");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- return 1;
- }
- if(IsPlayerInSF(playerid) && PassagemSF[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "O sr. não pode viajar para san fierro pois já está nela.");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- return 1;
- }
- if(IsPlayerInLV(playerid) && PassagemLV[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "O sr. não pode viajar para las venturas pois já está nela.");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- return 1;
- }
- PlayAudioStreamForPlayer(playerid, "https://0c74267d-a-62cb3a1a-s-sites.googlegroups.com/site/brasilplaystark/aero.mp3?");
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 2.5762,33.2962,1199.5938);
- pembarcado[playerid] = 1;
- TempoEmbarcado = SetTimer("Embarcado", 25000, 0);
- SendClientMessage(playerid, COR_ROXO, "Aeromoça Andressa: Por Favor, apertem os cintos decolaremos daqui à alguns segundos !");
- SendClientMessage(playerid, COR_ROXO, "Comandante Eliezer: Já estamos decolando, preparem-se !");
- KillTimer(TempoEmbarque);
- KillTimer(TempoAgendado);
- return 1;
- }
- if (strcmp("/agendarvoo", cmdtext, true, 10) == 0)
- {
- 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))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
- return 1;
- }
- if(PassagemSF[playerid] != 1 && PassagemLS[playerid] != 1 && PassagemLB[playerid] != 1 && PassagemLV[playerid] != 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Você não tem uma passagem !");
- return 1;
- }
- TogglePlayerControllable(playerid, 0);
- 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");
- KillTimer(TempoEmbarque);
- return 1;
- }
- if (strcmp("/ajudavoo", cmdtext, true, 10) == 0)
- {
- 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))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está no aeroporto !");
- return 1;
- }
- TogglePlayerControllable(playerid, 0);
- 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");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- TogglePlayerControllable(playerid, 1);
- if(dialogid == 7500)
- {
- TogglePlayerControllable(playerid, 1);
- if(response == 0) { return ShowPlayerDialog(playerid,7500,DIALOG_STYLE_LIST,"TAM EXPRESS - PASSAGENS","Los Santos\nLibert City\nLas Venturas\nSan Fierro","Comprar","Cancelar"); }
- switch(listitem)
- {
- case 0:
- {
- PassagemLS[playerid] = 1;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para Los Santos !");
- SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
- pembarque[playerid] = 1;
- TempoEmbarque = SetTimer("Embarque", 15000, 0);
- }
- case 1:
- {
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 1;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para Libert City !");
- SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
- pembarque[playerid] = 1;
- TempoEmbarque = SetTimer("Embarque", 15000, 0);
- }
- case 2:
- {
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 1;
- PassagemSF[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para Las Venturas !");
- SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
- pembarque[playerid] = 1;
- TempoEmbarque = SetTimer("Embarque", 15000, 0);
- }
- case 3:
- {
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 1;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: O sr. comprou uma passagem para San Fierro !");
- SendClientMessage(playerid, COLOR_RED, "Por Favor Embarque Imediatamente, o seu decolará daqui a alguns segundos !");
- pembarque[playerid] = 1;
- TempoEmbarque = SetTimer("Embarque", 15000, 0);
- }
- }
- }
- if(dialogid == 7501)
- {
- TogglePlayerControllable(playerid, 1);
- 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"); }
- switch(listitem)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
- pagendado[playerid] = 1;
- TempoAgendado = SetTimer("Agendado", 300000, 0);
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
- pagendado[playerid] = 1;
- TempoAgendado = SetTimer("Agendado", 300000, 0);
- }
- case 2:
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
- pagendado[playerid] = 1;
- TempoAgendado = SetTimer("Agendado", 300000, 0);
- }
- case 3:
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Seu vôo foi agendado, compareça no aeroporto daqui a 5 minutos !");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Atendente: Obs: caso o sr. não compareça perderá sua passagem .");
- pagendado[playerid] = 1;
- TempoAgendado = SetTimer("Agendado", 300000, 0);
- }
- }
- }
- return 1;
- }
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return true;
- }
- }
- return 0;
- }
- forward Embarque(playerid);
- public Embarque(playerid)
- {
- if(pembarque[playerid] > 0)
- {
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "O sr. não embarcou a tempo e o seu vôo decolou.");
- }
- return 1;
- }
- forward Agendado(playerid);
- public Agendado(playerid)
- {
- if(pagendado[playerid] > 0)
- {
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "O sr. não compareceu no aeroporto a tempo por isso perdeu suas passagens.");
- }
- return 1;
- }
- forward Embarcado(playerid);
- public Embarcado(playerid)
- {
- if(pembarcado[playerid] > 0)
- {
- if(PassagemLS[playerid] == 1)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1827.9844,-2492.4976,16.4132);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- KillTimer(TempoEmbarcado);
- StopAudioStreamForPlayer(playerid);
- }
- else if(PassagemSF[playerid] == 1)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -1421.2096,-287.2144,14.1484);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- KillTimer(TempoEmbarcado);
- StopAudioStreamForPlayer(playerid);
- }
- else if(PassagemLV[playerid] == 1)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1679.0310,1509.3196,10.7741);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- KillTimer(TempoEmbarcado);
- StopAudioStreamForPlayer(playerid);
- }
- else if(PassagemLB[playerid] == 1)
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, -777.8772,505.1375,1376.5930);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Chegamos ao seu destino, TAM EXPRESS agradece !");
- PassagemLS[playerid] = 0;
- PassagemLB[playerid] = 0;
- PassagemLV[playerid] = 0;
- PassagemSF[playerid] = 0;
- KillTimer(TempoEmbarcado);
- StopAudioStreamForPlayer(playerid);
- }
- }
- return 1;
- }
- #endif
- /*
- ________________________________________________________________________
- ________________________________________________________________________
- || ||
- || FS TAM EXPRESS BY: LUCAS_SCRIPT DARK_SCRIPT CAIO_SCRIPT v1.0 ||
- || ||
- || ||
- || FS FEITO A PEDIDO DE WESLLEY_SCRIPT ||
- || ||
- || ||
- || ||
- || Não Retire os Créditos se não o pau vai comer !!! ||
- || ||
- ________________________________________________________________________
- ________________________________________________________________________
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement