Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Filterscript criado por n0minal
- */
- #include <a_samp>
- #define FILTERSCRIPT
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_BLUE 0x2641FEAA
- #define KEY_HORN 2
- new portao[9];
- new Pickup[9];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" [ FS ] Pedagios: criado por n0minal! ");
- print("--------------------------------------\n");
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, 71.9957,-1534.3894,5.2046,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, 59.5030,-1532.9253,5.2139,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, 1740.2538,505.0170,28.8597,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, 1728.5652,515.0717,28.5365,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, -2681.8362,1280.4871,55.9456,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, -1404.3192,811.3879,47.3449,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, -1411.8649,822.5869,47.3678,25.0,0);
- Create3DTextLabel("Pedágio: Aperte H para liberar o caminho!",0xff0000ff, -2681.8472,1268.6603,55.9456,25.0,0);
- Pickup[1] = CreatePickup(1239, 1, 71.9957,-1534.3894,5.2046);
- Pickup[2] = CreatePickup(1239, 1, 59.5030,-1532.9253,5.2139);
- Pickup[3] = CreatePickup(1239, 1, 1740.2538,505.0170,28.8597);
- Pickup[4] = CreatePickup(1239, 1, 1728.5652,515.0717,28.5365);
- Pickup[5] = CreatePickup(1239, 1, -2681.8362,1280.4871,55.9456);
- Pickup[6] = CreatePickup(1239, 1, -1404.3192,811.3879,47.3449);
- Pickup[7] = CreatePickup(1239, 1, -1411.8649,822.5869,47.3678);
- Pickup[8] = CreatePickup(1239, 1, -2681.8472,1268.6603,55.9456);
- //Pedágio Rodeo
- portao[1] = CreateObject(968, 67.83, -1529.78, 4.79, 0.00, 90.00, 90.00);//da direita
- portao[2] = CreateObject(968, 67.47, -1537.44, 4.79, 0.00, 90.00, -90.00);//da esquerda
- //Pedágio Los Santos
- portao[3] = CreateObject(968, 1731.04, 511.49, 28.48, 0.00, -90.00, -20.00);//da esquerda
- portao[4] = CreateObject(968, 1738.09, 509.31, 28.57, 0.00, 90.00, -20.00);//da direita
- //Pedágio San Fierro
- portao[5] = CreateObject(968, -1411.68, 818.56, 47.18, 360.00, -90.00, -48.40);//da esquerda
- portao[6] = CreateObject(968, -1404.05, 817.20, 47.18, 360.00, 90.00, -48.40);//da direita
- //Pedágio Bayside
- portao[7] = CreateObject(968, -2689.38, 1269.53, 55.45, 0.00, 90.00, 0.00);//da direita
- portao[8] = CreateObject(968, -2673.69, 1279.64, 55.45, 0.00, -90.00, 0.00);//da esquerda
- //objects portao1 e 2
- CreateObject(7033, 65.927567, -1533.642700, 8.355223, 0.8594, 0.0000, 83.3654);
- CreateObject(3877, 67.976868, -1531.783813, 5.551031, 0.0000, 0.0000, 353.9839);
- CreateObject(3877, 68.430626, -1522.038086, 5.578691, 0.0000, 0.0000, 356.5623);
- CreateObject(3877, 67.3796, -1545.6030, 5.6980, 0.0000, 0.0000, 356.5623);
- CreateObject(3877, 67.5600, -1536.3228, 5.7063, 0.0000, 0.0000, 354.8434);
- CreateObject(3864, 75.874809, -1534.855957, 10.345168, 0.0000, 0.0000, 173.5018);
- CreateObject(3864, 56.145210, -1532.551636, 10.351826, 0.0000, 0.0000, 353.9837);
- CreateObject(3877, 28.482025, -1527.640137, 5.680993, 0.0000, 0.0000, 351.4056);
- CreateObject(3877, 19.857996, -1525.820435, 5.018308, 0.0000, 0.0000, 348.8273);
- CreateObject(3877, 13.395845, -1524.428955, 4.614534, 0.0000, 0.0000, 348.8273);
- CreateObject(966, 67.82, -1530.09, 3.97, 0.00, 0.00, -90.00);
- CreateObject(3877, 68.02, -1530.89, 5.58, 0.00, 0.00, 356.56);
- CreateObject(3877, 67.40, -1544.83, 5.70, 0.00, 0.00, 356.56);
- CreateObject(966, 67.46, -1537.25, 3.97, 0.00, 0.00, 90.00);
- //objects portao3 e 4
- CreateObject(7033, 1735.2945556641, 512.66381835938, 31.834371566772, 0, 0, 339.99938964844);
- CreateObject(987, 1722.28125, 511.55117797852, 27.720676422119, 0, 4, 71.998901367188);
- CreateObject(987, 1726.1037597656, 523.12225341797, 26.624887466431, 0, 0, 113.99719238281);
- CreateObject(987, 1748.6484375, 514.7958984375, 27.250556945801, 0, 0, 249.99389648438);
- CreateObject(987, 1758.2679443359, 520.96795654297, 26.054347991943, 0, 356, 217.98910522461);
- CreateObject(987, 1711.2819824219, 503.29724121094, 28.032232284546, 0, 0, 31.997680664063);
- CreateObject(987, 1744.3728027344, 502.07650756836, 28.077571868896, 0, 0, 291.99621582031);
- CreateObject(1237, 1723.8087158203, 514.22821044922, 27.671068191528, 0, 0, 0);
- CreateObject(1237, 1745.0375976563, 506.91006469727, 27.669532775879, 0, 0, 0);
- CreateObject(966, 1737.81, 509.46, 27.72, 0.00, 0.00, -200.00);
- CreateObject(1237, 1737.02, 509.86, 27.67, 0.00, 0.00, 0.00);
- CreateObject(966, 1731.37, 511.36, 27.72, 0.00, 0.00, -20.00);
- CreateObject(1237, 1732.19, 511.12, 27.67, 0.00, 0.00, 0.00);
- //objects portao5 e 6
- CreateObject(7033, -1407.8485107422, 817.6396484375, 50.383720397949, 0, 0, 316);
- CreateObject(987, -1420.9528808594, 821.13604736328, 45.69006729126, 0, 0, 48);
- CreateObject(987, -1395.7629394531, 813.71850585938, 46.307685852051, 0, 0, 227.99877929688);
- /////////////////////Isolamento (Direita)///////////////////////
- CreateObject(1237, -1399.09, 811.54, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1402.26, 802.61, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1403.02, 803.24, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1401.48, 801.88, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1401.19, 800.47, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1400.38, 799.64, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1399.56, 798.87, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1393.13, 813.65, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1392.60, 812.81, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1391.96, 811.99, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1391.35, 811.14, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1390.64, 810.44, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1389.93, 809.79, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1389.39, 809.00, 46.65, 0.00, 0.00, 0.00);
- CreateObject(1237, -1416.72, 824.44, 46.26, 0.00, 0.00, 0.00);
- ////////////////////Isolamento (Esquerda)///////////////////////
- CreateObject(1237, -1410.90, 817.78, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1422.30, 822.09, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1423.13, 822.63, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1423.86, 823.43, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1424.65, 823.99, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1425.37, 824.55, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1426.14, 825.08, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1426.94, 825.67, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1412.89, 831.84, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1413.88, 832.35, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1414.72, 833.13, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1415.56, 833.77, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1416.23, 834.44, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1416.94, 835.09, 46.26, 0.00, 0.00, 0.00);
- CreateObject(1237, -1417.77, 835.57, 46.26, 0.00, 0.00, 0.00);
- ///////////////////////////////////////////////////////////////
- CreateObject(966, -1404.27, 817.43, 46.37, 0.00, 0.00, -228.75);
- CreateObject(966, -1411.50, 818.28, 46.37, 0.00, 0.00, 311.40);
- //objects portao7 e 8
- CreateObject(987, -2672.3884277344, 1270.6895751953, 54.004661560059, 0, 0, 322.25);
- CreateObject(987, -2699.5107421875, 1262.8109130859, 53.97966003418, 0, 0, 41.745483398438);
- CreateObject(966, -2689.74, 1269.53, 54.65, 0.00, 0.00, 180.00);
- CreateObject(966, -2673.35, 1279.63, 54.70, 0.00, 0.00, 0.00);
- CreateObject(987, -2699.57, 1283.15, 53.98, 0.00, 0.00, -41.75);
- CreateObject(987, -2672.73, 1277.73, 54.00, 0.00, 0.00, -322.25);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- RemoveBuildingForPlayer(playerid, 1283, 73.8125, -1543.1250, 7.5313, 0.25);//portão 1 e 2
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == Pickup[1] || pickupid == Pickup[2]|| pickupid == Pickup[3] || pickupid == Pickup[4]
- pickupid == Pickup[5] || pickupid == Pickup[6] || pickupid == Pickup[7] || pickupid == Pickup[8])
- {
- SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFAA, "Entre no seu carro e aperte H para liberar o caminho!");
- SendClientMessage(playerid, 0xFFFFFFAA, "A cancela fecha 2 segundos depois de aberta.");
- SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa $15 tenha uma boa viagem.");
- SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(IsPlayerInRangeOfPoint(playerid, 10, -1412.3848, 812.9502, 47.7167))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[6],-1404.05, 817.20, 47.18, 5.5, 360.00, 0.00, -48.40);
- SetTimer("GateClose6", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, -1403.4413,822.1852,47.8172))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[5], -1411.68, 818.56, 47.18, 5.5, 360.00, 0.00, -48.40);
- SetTimer("GateClose5", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, -2677.1943, 1282.1063, 54.4258))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[8],-2673.69, 1279.64, 55.45, 5.5, 0.00, 0.00, 0.00);//portão da direita
- SetTimer("GateClose8", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, -2687.3574, 1272.3484, 55.3856))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[7], -2689.38, 1269.53, 55.45, 5.5, 0.00, 0.00, 0.00);//portão da esquerda
- SetTimer("GateClose7", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, 71.9957,-1534.3894,5.2046))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[1],67.83, -1529.78, 4.79, 5.5, 0.00, 0.00, 90.00);//portão da direita
- SetTimer("GateClose1", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, 63.0989,-1540.5431,5.0593))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[2], 67.47, -1537.44, 4.79, 5.5, 0.00, 0.0, -90.0);//portão da esquerda
- SetTimer("GateClose2", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedaggio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, 1733.1107,506.8286,28.9694))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[4], 1738.09, 509.31, 28.57, 5.5, 0.00, 0.00, -20.00);//portão da direita
- SetTimer("GateClose4", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- if(IsPlayerInRangeOfPoint(playerid, 10, 1737.4161,518.6452,28.1503))
- {
- if ((newkeys & KEY_HORN ) && !(oldkeys & KEY_HORN ))
- {
- MoveObject(portao[3],1731.04, 511.49, 28.48, 5.5, 0.00, 0.00, -20.00);//portão da esquerda
- SetTimer("GateClose3", 2000, 0);
- SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
- GivePlayerMoney(playerid,-15);
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- 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);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- forward GateClose1();
- public GateClose1()
- {
- MoveObject (portao[1],67.83, -1529.78, 4.79, 2.5, 0.00, 90.00, 90.00);//
- return 1;
- }
- forward GateClose2();
- public GateClose2()
- {
- MoveObject (portao[2],67.47, -1537.44, 4.79, 2.5, 0.00, 90.00, -90.00);//
- return 1;
- }
- forward GateClose3();
- public GateClose3()
- {
- MoveObject (portao[3],1731.04, 511.49, 28.48, 2.5, 0.00, -90.00, -20.00);//
- return 1;
- }
- forward GateClose4();
- public GateClose4()
- {
- MoveObject (portao[4],1738.09, 509.31, 28.57, 2.5, 0.00, 90.00, -20.00);//
- return 1;
- }
- forward GateClose5();
- public GateClose5()
- {
- MoveObject (portao[5],-1411.68, 818.56, 47.18, 2.5, 360.00, -90.00, -48.40);//
- return 1;
- }
- forward GateClose6();
- public GateClose6()
- {
- MoveObject (portao[6],-1404.05, 817.20, 47.18, 2.5, 360.00, 90.00, -48.40);//
- return 1;
- }
- forward GateClose7();
- public GateClose7()
- {
- MoveObject (portao[7],-2689.38, 1269.53, 55.45, 2.5, 0.00, 90.00, 0.00);//
- return 1;
- }
- forward GateClose8();
- public GateClose8()
- {
- MoveObject (portao[8],-2673.69, 1279.64, 55.45, 2.5, 0.00, -90.00, 0.00);//
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement