Advertisement
Guest User

Pedadio

a guest
Apr 23rd, 2012
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 16.07 KB | None | 0 0
  1. /*VISITE NOSSO SITE: http://www.sampknd.com/
  2.   SAMP KND MELHOR BLOG DE SAMP DO BRASIL
  3. */
  4.  
  5. #include <a_samp>
  6.  
  7. #define COLOR_YELLOW 0xFFFF00AA
  8. #define COLOR_BLUE 0x2641FEAA
  9. #define FILTERSCRIPT
  10. #pragma tabsize 0
  11.  
  12. new portao1;
  13. new portao2;
  14. new portao3;
  15. new portao4;
  16. new portao5;
  17. new portao6;
  18. new portao7;
  19. new portao8;
  20. new Pickup1;
  21. new Pickup2;
  22. new Pickup3;
  23. new Pickup4;
  24. new Pickup5;
  25. new Pickup6;
  26. new Pickup7;
  27. new Pickup8;
  28.  
  29. forward GateClose();
  30. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  31.  
  32. public OnFilterScriptInit()
  33. {
  34.     print("\n--------------------------------------");
  35.     print("         [ FS ] Pedagios                ");
  36.     print("         Creditos: By Dean               ");
  37.     print("         Não Retire os Creditos          ");
  38.     print("--------------------------------------\n");
  39.  
  40.     Create3DTextLabel("Pedágio LS - SF",0xFFFFFFAA, 71.9957,-1534.3894,5.2046,25.0,0);
  41.     Create3DTextLabel("Pedágio SF - LS",0xFFFFFFAA, 59.5030,-1532.9253,5.2139,25.0,0);
  42.     Create3DTextLabel("Pedágio LV - LS",0xFFFFFFAA, 1737.4161,518.6452,28.1503,25.0,0);
  43.     Create3DTextLabel("Pedágio LS - LV",0xFFFFFFAA, 1733.1107,506.8286,28.9694,25.0,0);
  44.     Create3DTextLabel("Pedágio Bayside - SF",0xFFFFFFAA, -2681.8362,1280.4871,55.9456,25.0,0);
  45.     Create3DTextLabel("Pedágio SF - FC",0xFFFFFFAA, -1412.3848,812.9502,47.7167,25.0,0);
  46.     Create3DTextLabel("Pedágio FC - SF",0xFFFFFFAA, -1403.4413,822.1852,47.8172,25.0,0);
  47.     Create3DTextLabel("Pedágio SF - Bayside",0xFFFFFFAA, -2681.8472,1268.6603,55.9456,25.0,0);
  48.     Pickup1 = CreatePickup(1239, 1, 71.9957,-1534.3894,5.2046);
  49.     Pickup2 = CreatePickup(1239, 1, 59.5030,-1532.9253,5.2139);
  50.     Pickup3 = CreatePickup(1239, 1, 1737.4161,518.6452,28.1503);
  51.     Pickup4 = CreatePickup(1239, 1, 1733.1107,506.8286,28.9694);
  52.     Pickup5 = CreatePickup(1239, 1, -2681.8362,1280.4871,55.9456);
  53.     Pickup6 = CreatePickup(1239, 1, -1412.3848,812.9502,47.7167);
  54.     Pickup7 = CreatePickup(1239, 1, -1403.4413,822.1852,47.8172);
  55.     Pickup8 = CreatePickup(1239, 1, -2681.8472,1268.6603,55.9456);
  56.     portao1 = CreateObject(971, 68.328880, -1526.939087, 7.015985, 0.0000, 0.0000, 87.6625);
  57.     portao2 = CreateObject(971, 67.909485, -1541.125732, 7.076734, 0.0000, 0.0000, 87.6625);
  58.     portao3 = CreateObject(971, 1728.5638427734, 512.89862060547, 31.260879516602, 0, 0, 341.99890136719);
  59.     portao4 = CreateObject(971, 1740.6317138672, 509.00531005859, 31.1568775177, 0, 0, 341.99340820313);
  60.     portao5 = CreateObject(971, -1412.0205078125, 822.9267578125, 49.750095367432, 0, 0, 317.99926757813);
  61.     portao6 = CreateObject(971, -1402.5791015625, 813.30859375, 49.656631469727, 0, 0, 315.99975585938);
  62.     portao7 = CreateObject(971, -2685.9326171875, 1275.3663330078, 56.574485778809, 0, 0, 0);
  63.     portao8 = CreateObject(971, -2677.2409667969, 1275.3305664063, 56.574516296387, 0, 0, 0);
  64. //objects portao1 e 2
  65.     CreateObject(7033, 65.927567, -1533.642700, 8.355223, 0.8594, 0.0000, 83.3654);
  66.     CreateObject(3877, 67.976868, -1531.783813, 5.551031, 0.0000, 0.0000, 353.9839);
  67.     CreateObject(3877, 68.430626, -1522.038086, 5.578691, 0.0000, 0.0000, 356.5623);
  68.     CreateObject(3877, 67.889786, -1545.917603, 5.697998, 0.0000, 0.0000, 356.5623);
  69.     CreateObject(3877, 68.519646, -1536.313232, 5.706335, 0.0000, 0.0000, 354.8434);
  70.     CreateObject(3864, 75.874809, -1534.855957, 10.345168, 0.0000, 0.0000, 173.5018);
  71.     CreateObject(3864, 56.145210, -1532.551636, 10.351826, 0.0000, 0.0000, 353.9837);
  72.     CreateObject(3877, 28.482025, -1527.640137, 5.680993, 0.0000, 0.0000, 351.4056);
  73.     CreateObject(3877, 19.857996, -1525.820435, 5.018308, 0.0000, 0.0000, 348.8273);
  74.     CreateObject(3877, 13.395845, -1524.428955, 4.614534, 0.0000, 0.0000, 348.8273);
  75. //objects portao3 e 4
  76.     CreateObject(7033, 1735.2945556641, 512.66381835938, 31.834371566772, 0, 0, 339.99938964844);
  77.     CreateObject(987, 1722.28125, 511.55117797852, 27.720676422119, 0, 4, 71.998901367188);
  78.     CreateObject(987, 1726.1037597656, 523.12225341797, 26.624887466431, 0, 0, 113.99719238281);
  79.     CreateObject(987, 1748.6484375, 514.7958984375, 27.250556945801, 0, 0, 249.99389648438);
  80.     CreateObject(987, 1758.2679443359, 520.96795654297, 26.054347991943, 0, 356, 217.98910522461);
  81.     CreateObject(987, 1711.2819824219, 503.29724121094, 28.032232284546, 0, 0, 31.997680664063);
  82.     CreateObject(987, 1744.3728027344, 502.07650756836, 28.077571868896, 0, 0, 291.99621582031);
  83.     CreateObject(1237, 1723.8087158203, 514.22821044922, 27.671068191528, 0, 0, 0);
  84.     CreateObject(1237, 1745.0375976563, 506.91006469727, 27.669532775879, 0, 0, 0);
  85. //objects portao5 e 6
  86.     CreateObject(7033, -1407.8485107422, 817.6396484375, 50.383720397949, 0, 0, 316);
  87.     CreateObject(987, -1420.9528808594, 821.13604736328, 45.69006729126, 0, 0, 48);
  88.     CreateObject(987, -1395.7629394531, 813.71850585938, 46.307685852051, 0, 0, 227.99877929688);
  89.     CreateObject(978, -1415.3200683594, 834.03137207031, 47.445243835449, 0, 0, 318);
  90.     CreateObject(978, -1423.9465332031, 826.30639648438, 47.367275238037, 0, 0, 317.99926757813);
  91.     CreateObject(978, -1391.2713623047, 811.06884765625, 47.264514923096, 0, 0, 318);
  92.     CreateObject(978, -1399.4782714844, 801.5634765625, 47.339115142822, 0, 0, 317.99926757813);
  93. //objects portao7 e 8
  94.     CreateObject(987, -2672.3884277344, 1270.6895751953, 54.004661560059, 0, 0, 322.25);
  95.     CreateObject(987, -2699.5107421875, 1262.8109130859, 53.97966003418, 0, 0, 41.745483398438);
  96.    
  97.  
  98.     print("\n--------------------------------------");
  99.     print("         [ FS ] Pedagios                ");
  100.     print("         Creditos: By Dean               ");
  101.     print("         Não Retire os Creditos          ");
  102.     print("--------------------------------------\n");
  103.     return 1;
  104. }
  105.  
  106. public OnFilterScriptExit()
  107. {
  108.     return 1;
  109. }
  110.  
  111. public OnPlayerPickUpPickup(playerid, pickupid) { // Início do public
  112.     if(pickupid == Pickup1) { // Pickup definido
  113.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  114.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para SF use /plssf");
  115.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para LS use /psfls");
  116.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  117.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  118.     }
  119.     if(pickupid == Pickup2) { // Pickup definido
  120.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  121.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para LS use /psfls");
  122.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para SF use /plssf");
  123.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  124.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  125.     }
  126.     if(pickupid == Pickup3) { // Pickup definido
  127.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  128.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LV para LS use /plvls");
  129.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para LV use /plslv");
  130.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  131.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  132.     }
  133.     if(pickupid == Pickup4) { // Pickup definido
  134.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  135.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LS para LV use /plslv");
  136.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de LV para LS use /plvls");
  137.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  138.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  139.     }
  140.     if(pickupid == Pickup5) { // Pickup definido
  141.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  142.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de Bayside para SF use /pbaysf");
  143.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para Bayside use /psfbay");
  144.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  145.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  146.     }
  147.     if(pickupid == Pickup6) { // Pickup definido
  148.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  149.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para FC use /psffc");
  150.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de FC para SF use /pfcsf");
  151.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  152.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  153.     }
  154.     if(pickupid == Pickup7) { // Pickup definido
  155.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  156.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de FC para SF use /pfcsf");
  157.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para FC use /psffc");
  158.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  159.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  160.     }
  161.     if(pickupid == Pickup8) { // Pickup definido
  162.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~ Pedágio ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  163.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de SF para Bayside use /psfbay");
  164.         SendClientMessage(playerid, 0xFFFFFFAA, "Se você estiver indo de Bayside para SF use /pbaysf");
  165.         SendClientMessage(playerid, 0xFFFFFFAA, "A passagem custa 15$ reais tenha uma boa viagem.");
  166.         SendClientMessage(playerid, 0xADFF2FAA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  167.     }
  168.     return 1;
  169. }
  170.  
  171. public OnPlayerCommandText(playerid, cmdtext[])
  172. {
  173.     if (strcmp(cmdtext, "/psfls", true)==0)
  174.     {
  175.     if(!PlayerToPoint(15.0, playerid, 59.5030,-1532.9253,5.2139))
  176.         {
  177.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  178.         return 1;
  179.         }
  180.         MoveObject(portao2,67.909485, -1541.125732, -0.773268, 5.5);
  181.         SetTimer("GateClose", 2000, 0);
  182.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  183.         GivePlayerMoney(playerid,-15);
  184.         return 1;
  185.     }
  186.     if (strcmp(cmdtext, "/plssf", true)==0)
  187.     {
  188.     if(!PlayerToPoint(15.0, playerid, 71.9957,-1534.3894,5.2046))
  189.         {
  190.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  191.         return 1;
  192.         }
  193.         MoveObject(portao1,68.328880, -1526.939087, -0.809014, 5.5);
  194.         SetTimer("GateClose", 2000, 0);
  195.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  196.         GivePlayerMoney(playerid,-15);
  197.         return 1;
  198.     }
  199.     if (strcmp(cmdtext, "/plvls", true)==0)
  200.     {
  201.     if(!PlayerToPoint(15.0, playerid, 1737.4161,518.6452,28.1503))
  202.         {
  203.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  204.         return 1;
  205.         }
  206.         MoveObject(portao3,1728.5638427734, 512.89862060547, -31.260879516602, 5.5);
  207.         SetTimer("GateClose", 2000, 0);
  208.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  209.         GivePlayerMoney(playerid,-15);
  210.         return 1;
  211.     }
  212.     if (strcmp(cmdtext, "/plslv", true)==0)
  213.     {
  214.     if(!PlayerToPoint(15.0, playerid, 1733.1107,506.8286,28.9694))
  215.         {
  216.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  217.         return 1;
  218.         }
  219.         MoveObject(portao4,1740.6317138672, 509.00531005859, -31.1568775177, 5.5);
  220.         SetTimer("GateClose", 2000, 0);
  221.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  222.         GivePlayerMoney(playerid,-15);
  223.         return 1;
  224.     }
  225.     if (strcmp(cmdtext, "/pbaysf", true)==0)
  226.     {
  227.     if(!PlayerToPoint(15.0, playerid, -2681.8362,1280.4871,55.9456))
  228.         {
  229.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  230.         return 1;
  231.         }
  232.         MoveObject(portao7,-2685.9326171875, 1275.3663330078, -56.574485778809, 5.5);
  233.         SetTimer("GateClose", 2000, 0);
  234.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  235.         GivePlayerMoney(playerid,-15);
  236.         return 1;
  237.     }
  238.     if (strcmp(cmdtext, "/psfbay", true)==0)
  239.     {
  240.     if(!PlayerToPoint(15.0, playerid, -2681.8472,1268.6603,55.9456))
  241.         {
  242.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  243.         return 1;
  244.         }
  245.         MoveObject(portao8,-2677.2409667969, 1275.3305664063, -56.574516296387, 5.5);
  246.         SetTimer("GateClose", 2000, 0);
  247.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  248.         GivePlayerMoney(playerid,-15);
  249.         return 1;
  250.     }
  251.     if (strcmp(cmdtext, "/pfcsf", true)==0)
  252.     {
  253.     if(!PlayerToPoint(15.0, playerid, -1403.4413,822.1852,47.8172))
  254.         {
  255.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  256.         return 1;
  257.         }
  258.         MoveObject(portao5,-1412.0205078125, 822.9267578125, -49.750095367432, 5.5);
  259.         SetTimer("GateClose", 2000, 0);
  260.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  261.         GivePlayerMoney(playerid,-15);
  262.         return 1;
  263.     }
  264.     if (strcmp(cmdtext, "/psffc", true)==0)
  265.     {
  266.     if(!PlayerToPoint(15.0, playerid, -1412.3848,812.9502,47.7167))
  267.         {
  268.         SendClientMessage(playerid, 0xAA3333AA, "| INFO | Você não está próximo ao Pedágio.");
  269.         return 1;
  270.         }
  271.         MoveObject(portao6,-1402.5791015625, 813.30859375, -49.656631469727, 5.5);
  272.         SetTimer("GateClose", 2000, 0);
  273.         SendClientMessage(playerid, COLOR_BLUE,"| INFO | Pedagio pago 15$ tenha uma boa viagem e dirija com cuidado.");
  274.         GivePlayerMoney(playerid,-15);
  275.         return 1;
  276.     }
  277.     return 0;
  278. }
  279.  
  280. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  281. {
  282.     if(IsPlayerConnected(playerid))
  283.     {
  284.         new Float:oldposx, Float:oldposy, Float:oldposz;
  285.         new Float:tempposx, Float:tempposy, Float:tempposz;
  286.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  287.         tempposx = (oldposx -x);
  288.         tempposy = (oldposy -y);
  289.         tempposz = (oldposz -z);
  290.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  291.         {
  292.             return 1;
  293.         }
  294.     }
  295.     return 0;
  296. }
  297.  
  298. public GateClose()
  299. {
  300.     MoveObject (portao1,68.328880, -1526.939087, 7.015985, 2.5);
  301.     MoveObject (portao2,67.909485, -1541.125732, 7.076734, 2.5);
  302.     MoveObject (portao3,1728.5638427734, 512.89862060547, 31.260879516602, 2.5);
  303.     MoveObject (portao4,1740.6317138672, 509.00531005859, 31.1568775177, 2.5);
  304.     MoveObject (portao5,-1412.0205078125, 822.9267578125, 49.750095367432, 2.5);
  305.     MoveObject (portao6,-1402.5791015625, 813.30859375, 49.656631469727, 2.5);
  306.     MoveObject (portao7,-2685.9326171875, 1275.3663330078, 56.574485778809, 2.5);
  307.     MoveObject (portao8,-2677.2409667969, 1275.3305664063, 56.574516296387, 2.5);
  308.     return 1;
  309. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement