Advertisement
Nando_Script

Velocimetro 2.0 Completo

Jul 22nd, 2014
2,837
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 45.62 KB | None | 0 0
  1. /*
  2. AUTOR: FernandoSS
  3. Por Favor não retire os creditos.
  4. */
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. #define FILTERSCRIPT
  9.  
  10. #define MAX_ZONE_NAME 28
  11.  
  12. #define GasMax 100
  13. #define RefuelWait 5000
  14. #define RunOutTime 15000
  15.  
  16. enum
  17.     SavePlayerPosEnum
  18. {
  19.     Float:LastX,
  20.     Float:LastY,
  21.     Float:LastZ
  22. };
  23.  
  24. enum
  25.     SAZONE_MAIN
  26. {
  27.     SAZONE_NAME[28],
  28.     Float:SAZONE_AREA[6]
  29. };
  30.  
  31. new
  32.     Text:Combust,
  33.     Text:Velo,
  34.     Text:Kmh,
  35.     Text:Veiculo,
  36.     Text:Localidades,
  37.     Text:FitaRodape,
  38.     checkgastimer,
  39.     stoppedvehtimer,
  40.     gGasBiz[MAX_PLAYERS],
  41.     Gas[MAX_VEHICLES],
  42.     string[256],
  43.     zone[MAX_ZONE_NAME],
  44.     SavePlayerPos[MAX_PLAYERS][SavePlayerPosEnum],
  45.     Refueling[MAX_PLAYERS],
  46.     UpdateSeconds = 1,
  47.     closest = -1,
  48.     spe,
  49.     Float:x1,
  50.     Float:y1,
  51.     Float:z1,
  52.     Float:x2,
  53.     Float:y2,
  54.     Float:z2,
  55.     Float:GasX,
  56.     Float:GasY,
  57.     Float:GasZ,
  58.     FillUp,
  59.     FillUpPrice,
  60.     Float:pos[4],
  61.     Float:olddistance,
  62.     Float:newdistance,
  63.     Float:x,
  64.     Float:y,
  65.     Float:z,
  66.     TmpZone[MAX_ZONE_NAME],
  67.     Float:distance,
  68.     timerspeedo,
  69.     value
  70. ;
  71.  
  72. forward Float:GetDistanceBetweenPlayerToPoint(p1,Float:px,Float:py,Float:pz);
  73. forward NoPosto(playerid);
  74. forward Fillup();
  75. forward StoppedVehicle();
  76. forward CheckGas();
  77. forward Speedo();
  78.  
  79. new
  80.     Veiculos[][] =
  81. {
  82.         "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  83.         "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  84.         "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  85.         "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  86.         "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  87.         "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  88.         "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  89.         "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  90.         "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  91.         "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  92.         "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  93.         "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  94.         "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  95.         "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  96.         "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
  97.         "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  98.         "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  99.         "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  100.         "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  101.         "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  102.         "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  103.         "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  104.         "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  105.         "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  106.         "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  107.         "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  108.         "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  109.         "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  110.         "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  111.         "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  112.         "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  113.         "Tiller", "Utility Trailer"
  114. };
  115.  
  116. static const gSAZones[][SAZONE_MAIN] =
  117. {
  118.     {"The Big Ear",                 {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
  119.     {"Aldea Malvada",               {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
  120.     {"Angel Pine",                  {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
  121.     {"Arco del Oeste",              {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
  122.     {"Avispa Country Club",         {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
  123.     {"Avispa Country Club",         {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
  124.     {"Avispa Country Club",         {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
  125.     {"Avispa Country Club",         {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10}},
  126.     {"Avispa Country Club",         {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10}},
  127.     {"Avispa Country Club",         {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70}},
  128.     {"Back o Beyond",               {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00}},
  129.     {"Battery Point",               {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00}},
  130.     {"Bayside",                     {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
  131.     {"Bayside Marina",              {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00}},
  132.     {"Beacon Hill",                 {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50}},
  133.     {"Blackfield",                  {964.30,1203.20,-89.00,1197.30,1403.20,110.90}},
  134.     {"Blackfield",                  {964.30,1403.20,-89.00,1197.30,1726.20,110.90}},
  135.     {"Blackfield Chapel",           {1375.60,596.30,-89.00,1558.00,823.20,110.90}},
  136.     {"Blackfield Chapel",           {1325.60,596.30,-89.00,1375.60,795.00,110.90}},
  137.     {"Blackfield Intersection",     {1197.30,1044.60,-89.00,1277.00,1163.30,110.90}},
  138.     {"Blackfield Intersection",     {1166.50,795.00,-89.00,1375.60,1044.60,110.90}},
  139.     {"Blackfield Intersection",     {1277.00,1044.60,-89.00,1315.30,1087.60,110.90}},
  140.     {"Blackfield Intersection",     {1375.60,823.20,-89.00,1457.30,919.40,110.90}},
  141.     {"Blueberry",                   {104.50,-220.10,2.30,349.60,152.20,200.00}},
  142.     {"Blueberry",                   {19.60,-404.10,3.80,349.60,-220.10,200.00}},
  143.     {"Blueberry Acres",             {-319.60,-220.10,0.00,104.50,293.30,200.00}},
  144.     {"Caligula's Palace",           {2087.30,1543.20,-89.00,2437.30,1703.20,110.90}},
  145.     {"Caligula's Palace",           {2137.40,1703.20,-89.00,2437.30,1783.20,110.90}},
  146.     {"Calton Heights",              {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00}},
  147.     {"Chinatown",                   {-2274.10,578.30,-7.60,-2078.60,744.10,200.00}},
  148.     {"City Hall",                   {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
  149.     {"Come-A-Lot",                  {2087.30,943.20,-89.00,2623.10,1203.20,110.90}},
  150.     {"Commerce",                    {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90}},
  151.     {"Commerce",                    {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90}},
  152.     {"Commerce",                    {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90}},
  153.     {"Commerce",                    {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90}},
  154.     {"Commerce",                    {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90}},
  155.     {"Commerce",                    {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90}},
  156.     {"Conference Center",           {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90}},
  157.     {"Conference Center",           {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90}},
  158.     {"Cranberry Station",           {-2007.80,56.30,0.00,-1922.00,224.70,100.00}},
  159.     {"Creek",                       {2749.90,1937.20,-89.00,2921.60,2669.70,110.90}},
  160.     {"Dillimore",                   {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
  161.     {"Doherty",                     {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
  162.     {"Doherty",                     {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00}},
  163.     {"Downtown",                    {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00}},
  164.     {"Downtown",                    {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00}},
  165.     {"Downtown",                    {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00}},
  166.     {"Downtown",                    {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00}},
  167.     {"Downtown",                    {-2078.60,578.30,-7.60,-1499.80,744.20,200.00}},
  168.     {"Downtown",                    {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
  169.     {"Downtown Los Santos",         {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
  170.     {"Downtown Los Santos",         {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90}},
  171.     {"Downtown Los Santos",         {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90}},
  172.     {"Downtown Los Santos",         {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90}},
  173.     {"Downtown Los Santos",         {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90}},
  174.     {"Downtown Los Santos",         {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90}},
  175.     {"Downtown Los Santos",         {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90}},
  176.     {"Downtown Los Santos",         {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90}},
  177.     {"Downtown Los Santos",         {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90}},
  178.     {"East Beach",                  {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
  179.     {"East Beach",                  {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90}},
  180.     {"East Beach",                  {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90}},
  181.     {"East Beach",                  {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90}},
  182.     {"East Los Santos",             {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90}},
  183.     {"East Los Santos",             {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90}},
  184.     {"East Los Santos",             {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90}},
  185.     {"East Los Santos",             {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90}},
  186.     {"East Los Santos",             {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90}},
  187.     {"East Los Santos",             {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90}},
  188.     {"East Los Santos",             {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90}},
  189.     {"Easter Basin",                {-1794.90,249.90,-9.10,-1242.90,578.30,200.00}},
  190.     {"Easter Basin",                {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00}},
  191.     {"Easter Bay Airport",          {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00}},
  192.     {"Easter Bay Airport",          {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00}},
  193.     {"Easter Bay Airport",          {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00}},
  194.     {"Easter Bay Airport",          {-1242.90,-50.00,0.00,-1213.90,578.30,200.00}},
  195.     {"Easter Bay Airport",          {-1213.90,-50.00,-4.50,-947.90,578.30,200.00}},
  196.     {"Easter Bay Airport",          {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40}},
  197.     {"Easter Bay Airport",          {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40}},
  198.     {"Easter Bay Airport",          {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40}},
  199.     {"Easter Bay Chemicals",        {-1132.80,-768.00,0.00,-956.40,-578.10,200.00}},
  200.     {"Easter Bay Chemicals",        {-1132.80,-787.30,0.00,-956.40,-768.00,200.00}},
  201.     {"El Castillo del Diablo",      {-464.50,2217.60,0.00,-208.50,2580.30,200.00}},
  202.     {"El Castillo del Diablo",      {-208.50,2123.00,-7.60,114.00,2337.10,200.00}},
  203.     {"El Castillo del Diablo",      {-208.50,2337.10,0.00,8.40,2487.10,200.00}},
  204.     {"El Corona",                   {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90}},
  205.     {"El Corona",                   {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90}},
  206.     {"El Quebrados",                {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00}},
  207.     {"Esplanade East",              {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00}},
  208.     {"Esplanade East",              {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00}},
  209.     {"Esplanade East",              {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30}},
  210.     {"Esplanade North",             {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00}},
  211.     {"Esplanade North",             {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00}},
  212.     {"Esplanade North",             {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00}},
  213.     {"Fallen Tree",                 {-792.20,-698.50,-5.30,-452.40,-380.00,200.00}},
  214.     {"Fallow Bridge",               {434.30,366.50,0.00,603.00,555.60,200.00}},
  215.     {"Fern Ridge",                  {508.10,-139.20,0.00,1306.60,119.50,200.00}},
  216.     {"Financial",                   {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00}},
  217.     {"Fisher's Lagoon",             {1916.90,-233.30,-100.00,2131.70,13.80,200.00}},
  218.     {"Flint Intersection",          {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
  219.     {"Flint Range",                 {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
  220.     {"Fort Carson",                 {-376.20,826.30,-3.00,123.70,1220.40,200.00}},
  221.     {"Foster Valley",               {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00}},
  222.     {"Foster Valley",               {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00}},
  223.     {"Foster Valley",               {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00}},
  224.     {"Foster Valley",               {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00}},
  225.     {"Frederick Bridge",            {2759.20,296.50,0.00,2774.20,594.70,200.00}},
  226.     {"Gant Bridge",                 {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00}},
  227.     {"Gant Bridge",                 {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00}},
  228.     {"Ganton",                      {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90}},
  229.     {"Ganton",                      {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
  230.     {"Garcia",                      {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00}},
  231.     {"Garcia",                      {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00}},
  232.     {"Garver Bridge",               {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90}},
  233.     {"Garver Bridge",               {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90}},
  234.     {"Garver Bridge",               {-1499.80,696.40,-179.60,-1339.80,925.30,20.30}},
  235.     {"Glen Park",                   {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90}},
  236.     {"Glen Park",                   {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90}},
  237.     {"Glen Park",                   {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
  238.     {"Green Palms",                 {176.50,1305.40,-3.00,338.60,1520.70,200.00}},
  239.     {"Greenglass College",          {964.30,1044.60,-89.00,1197.30,1203.20,110.90}},
  240.     {"Greenglass College",          {964.30,930.80,-89.00,1166.50,1044.60,110.90}},
  241.     {"Hampton Barns",               {603.00,264.30,0.00,761.90,366.50,200.00}},
  242.     {"Hankypanky Point",            {2576.90,62.10,0.00,2759.20,385.50,200.00}},
  243.     {"Harry Gold Parkway",          {1777.30,863.20,-89.00,1817.30,2342.80,110.90}},
  244.     {"Hashbury",                    {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00}},
  245.     {"Hilltop Farm",                {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
  246.     {"Hunter Quarry",               {337.20,710.80,-115.20,860.50,1031.70,203.70}},
  247.     {"Idlewood",                    {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90}},
  248.     {"Idlewood",                    {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90}},
  249.     {"Idlewood",                    {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90}},
  250.     {"Idlewood",                    {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90}},
  251.     {"Idlewood",                    {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90}},
  252.     {"Idlewood",                    {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
  253.     {"Jefferson",                   {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90}},
  254.     {"Jefferson",                   {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90}},
  255.     {"Jefferson",                   {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90}},
  256.     {"Jefferson",                   {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90}},
  257.     {"Jefferson",                   {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90}},
  258.     {"Jefferson",                   {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
  259.     {"Julius Thruway East",         {2623.10,943.20,-89.00,2749.90,1055.90,110.90}},
  260.     {"Julius Thruway East",         {2685.10,1055.90,-89.00,2749.90,2626.50,110.90}},
  261.     {"Julius Thruway East",         {2536.40,2442.50,-89.00,2685.10,2542.50,110.90}},
  262.     {"Julius Thruway East",         {2625.10,2202.70,-89.00,2685.10,2442.50,110.90}},
  263.     {"Julius Thruway North",        {2498.20,2542.50,-89.00,2685.10,2626.50,110.90}},
  264.     {"Julius Thruway North",        {2237.40,2542.50,-89.00,2498.20,2663.10,110.90}},
  265.     {"Julius Thruway North",        {2121.40,2508.20,-89.00,2237.40,2663.10,110.90}},
  266.     {"Julius Thruway North",        {1938.80,2508.20,-89.00,2121.40,2624.20,110.90}},
  267.     {"Julius Thruway North",        {1534.50,2433.20,-89.00,1848.40,2583.20,110.90}},
  268.     {"Julius Thruway North",        {1848.40,2478.40,-89.00,1938.80,2553.40,110.90}},
  269.     {"Julius Thruway North",        {1704.50,2342.80,-89.00,1848.40,2433.20,110.90}},
  270.     {"Julius Thruway North",        {1377.30,2433.20,-89.00,1534.50,2507.20,110.90}},
  271.     {"Julius Thruway South",        {1457.30,823.20,-89.00,2377.30,863.20,110.90}},
  272.     {"Julius Thruway South",        {2377.30,788.80,-89.00,2537.30,897.90,110.90}},
  273.     {"Julius Thruway West",         {1197.30,1163.30,-89.00,1236.60,2243.20,110.90}},
  274.     {"Julius Thruway West",         {1236.60,2142.80,-89.00,1297.40,2243.20,110.90}},
  275.     {"Juniper Hill",                {-2533.00,578.30,-7.60,-2274.10,968.30,200.00}},
  276.     {"Juniper Hollow",              {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00}},
  277.     {"K.A.C.C. Military Fuels",     {2498.20,2626.50,-89.00,2749.90,2861.50,110.90}},
  278.     {"Kincaid Bridge",              {-1339.80,599.20,-89.00,-1213.90,828.10,110.90}},
  279.     {"Kincaid Bridge",              {-1213.90,721.10,-89.00,-1087.90,950.00,110.90}},
  280.     {"Kincaid Bridge",              {-1087.90,855.30,-89.00,-961.90,986.20,110.90}},
  281.     {"King's",                      {-2329.30,458.40,-7.60,-1993.20,578.30,200.00}},
  282.     {"King's",                      {-2411.20,265.20,-9.10,-1993.20,373.50,200.00}},
  283.     {"King's",                      {-2253.50,373.50,-9.10,-1993.20,458.40,200.00}},
  284.     {"LVA Freight Depot",           {1457.30,863.20,-89.00,1777.40,1143.20,110.90}},
  285.     {"LVA Freight Depot",           {1375.60,919.40,-89.00,1457.30,1203.20,110.90}},
  286.     {"LVA Freight Depot",           {1277.00,1087.60,-89.00,1375.60,1203.20,110.90}},
  287.     {"LVA Freight Depot",           {1315.30,1044.60,-89.00,1375.60,1087.60,110.90}},
  288.     {"LVA Freight Depot",           {1236.60,1163.40,-89.00,1277.00,1203.20,110.90}},
  289.     {"Las Barrancas",               {-926.10,1398.70,-3.00,-719.20,1634.60,200.00}},
  290.     {"Las Brujas",                  {-365.10,2123.00,-3.00,-208.50,2217.60,200.00}},
  291.     {"Las Colinas",                 {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90}},
  292.     {"Las Colinas",                 {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90}},
  293.     {"Las Colinas",                 {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90}},
  294.     {"Las Colinas",                 {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90}},
  295.     {"Las Colinas",                 {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90}},
  296.     {"Las Colinas",                 {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90}},
  297.     {"Las Colinas",                 {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90}},
  298.     {"Las Payasadas",               {-354.30,2580.30,2.00,-133.60,2816.80,200.00}},
  299.     {"Las Venturas Airport",        {1236.60,1203.20,-89.00,1457.30,1883.10,110.90}},
  300.     {"Las Venturas Airport",        {1457.30,1203.20,-89.00,1777.30,1883.10,110.90}},
  301.     {"Las Venturas Airport",        {1457.30,1143.20,-89.00,1777.40,1203.20,110.90}},
  302.     {"Las Venturas Airport",        {1515.80,1586.40,-12.50,1729.90,1714.50,87.50}},
  303.     {"Last Dime Motel",             {1823.00,596.30,-89.00,1997.20,823.20,110.90}},
  304.     {"Leafy Hollow",                {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00}},
  305.     {"Liberty City",                {-1000.00,400.00,1300.00,-700.00,600.00,1400.00}},
  306.     {"Lil' Probe Inn",              {-90.20,1286.80,-3.00,153.80,1554.10,200.00}},
  307.     {"Linden Side",                 {2749.90,943.20,-89.00,2923.30,1198.90,110.90}},
  308.     {"Linden Station",              {2749.90,1198.90,-89.00,2923.30,1548.90,110.90}},
  309.     {"Linden Station",              {2811.20,1229.50,-39.50,2861.20,1407.50,60.40}},
  310.     {"Little Mexico",               {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90}},
  311.     {"Little Mexico",               {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
  312.     {"Los Flores",                  {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90}},
  313.     {"Los Flores",                  {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90}},
  314.     {"Los Santos International",    {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90}},
  315.     {"Los Santos International",    {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90}},
  316.     {"Los Santos International",    {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90}},
  317.     {"Los Santos International",    {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90}},
  318.     {"Los Santos International",    {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90}},
  319.     {"Los Santos International",    {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
  320.     {"Marina",                      {647.70,-1804.20,-89.00,851.40,-1577.50,110.90}},
  321.     {"Marina",                      {647.70,-1577.50,-89.00,807.90,-1416.20,110.90}},
  322.     {"Marina",                      {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
  323.     {"Market",                      {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
  324.     {"Market",                      {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90}},
  325.     {"Market",                      {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90}},
  326.     {"Market",                      {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90}},
  327.     {"Market Station",              {787.40,-1410.90,-34.10,866.00,-1310.20,65.80}},
  328.     {"Martin Bridge",               {-222.10,293.30,0.00,-122.10,476.40,200.00}},
  329.     {"Missionary Hill",             {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00}},
  330.     {"Montgomery",                  {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
  331.     {"Montgomery",                  {1451.40,347.40,-6.10,1582.40,420.80,200.00}},
  332.     {"Montgomery Intersection",     {1546.60,208.10,0.00,1745.80,347.40,200.00}},
  333.     {"Montgomery Intersection",     {1582.40,347.40,0.00,1664.60,401.70,200.00}},
  334.     {"Mulholland",                  {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
  335.     {"Mulholland",                  {1281.10,-452.40,-89.00,1641.10,-290.90,110.90}},
  336.     {"Mulholland",                  {1269.10,-768.00,-89.00,1414.00,-452.40,110.90}},
  337.     {"Mulholland",                  {1357.00,-926.90,-89.00,1463.90,-768.00,110.90}},
  338.     {"Mulholland",                  {1318.10,-910.10,-89.00,1357.00,-768.00,110.90}},
  339.     {"Mulholland",                  {1169.10,-910.10,-89.00,1318.10,-768.00,110.90}},
  340.     {"Mulholland",                  {768.60,-954.60,-89.00,952.60,-860.60,110.90}},
  341.     {"Mulholland",                  {687.80,-860.60,-89.00,911.80,-768.00,110.90}},
  342.     {"Mulholland",                  {737.50,-768.00,-89.00,1142.20,-674.80,110.90}},
  343.     {"Mulholland",                  {1096.40,-910.10,-89.00,1169.10,-768.00,110.90}},
  344.     {"Mulholland",                  {952.60,-937.10,-89.00,1096.40,-860.60,110.90}},
  345.     {"Mulholland",                  {911.80,-860.60,-89.00,1096.40,-768.00,110.90}},
  346.     {"Mulholland",                  {861.00,-674.80,-89.00,1156.50,-600.80,110.90}},
  347.     {"Mulholland Intersection",     {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
  348.     {"North Rock",                  {2285.30,-768.00,0.00,2770.50,-269.70,200.00}},
  349.     {"Ocean Docks",                 {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90}},
  350.     {"Ocean Docks",                 {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90}},
  351.     {"Ocean Docks",                 {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90}},
  352.     {"Ocean Docks",                 {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90}},
  353.     {"Ocean Docks",                 {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90}},
  354.     {"Ocean Docks",                 {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90}},
  355.     {"Ocean Docks",                 {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
  356.     {"Ocean Flats",                 {-2994.40,277.40,-9.10,-2867.80,458.40,200.00}},
  357.     {"Ocean Flats",                 {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00}},
  358.     {"Ocean Flats",                 {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00}},
  359.     {"Octane Springs",              {338.60,1228.50,0.00,664.30,1655.00,200.00}},
  360.     {"Old Venturas Strip",          {2162.30,2012.10,-89.00,2685.10,2202.70,110.90}},
  361.     {"Palisades",                   {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00}},
  362.     {"Palomino Creek",              {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
  363.     {"Paradiso",                    {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00}},
  364.     {"Pershing Square",             {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
  365.     {"Pilgrim",                     {2437.30,1383.20,-89.00,2624.40,1783.20,110.90}},
  366.     {"Pilgrim",                     {2624.40,1383.20,-89.00,2685.10,1783.20,110.90}},
  367.     {"Pilson Intersection",         {1098.30,2243.20,-89.00,1377.30,2507.20,110.90}},
  368.     {"Pirates in Men's Pants",      {1817.30,1469.20,-89.00,2027.40,1703.20,110.90}},
  369.     {"Playa del Seville",           {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90}},
  370.     {"Prickle Pine",                {1534.50,2583.20,-89.00,1848.40,2863.20,110.90}},
  371.     {"Prickle Pine",                {1117.40,2507.20,-89.00,1534.50,2723.20,110.90}},
  372.     {"Prickle Pine",                {1848.40,2553.40,-89.00,1938.80,2863.20,110.90}},
  373.     {"Prickle Pine",                {1938.80,2624.20,-89.00,2121.40,2861.50,110.90}},
  374.     {"Queens",                      {-2533.00,458.40,0.00,-2329.30,578.30,200.00}},
  375.     {"Queens",                      {-2593.40,54.70,0.00,-2411.20,458.40,200.00}},
  376.     {"Queens",                      {-2411.20,373.50,0.00,-2253.50,458.40,200.00}},
  377.     {"Randolph Industrial Estate",  {1558.00,596.30,-89.00,1823.00,823.20,110.90}},
  378.     {"Redsands East",               {1817.30,2011.80,-89.00,2106.70,2202.70,110.90}},
  379.     {"Redsands East",               {1817.30,2202.70,-89.00,2011.90,2342.80,110.90}},
  380.     {"Redsands East",               {1848.40,2342.80,-89.00,2011.90,2478.40,110.90}},
  381.     {"Redsands West",               {1236.60,1883.10,-89.00,1777.30,2142.80,110.90}},
  382.     {"Redsands West",               {1297.40,2142.80,-89.00,1777.30,2243.20,110.90}},
  383.     {"Redsands West",               {1377.30,2243.20,-89.00,1704.50,2433.20,110.90}},
  384.     {"Redsands West",               {1704.50,2243.20,-89.00,1777.30,2342.80,110.90}},
  385.     {"Regular Tom",                 {-405.70,1712.80,-3.00,-276.70,1892.70,200.00}},
  386.     {"Richman",                     {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
  387.     {"Richman",                     {647.50,-954.60,-89.00,768.60,-860.60,110.90}},
  388.     {"Richman",                     {225.10,-1369.60,-89.00,334.50,-1292.00,110.90}},
  389.     {"Richman",                     {225.10,-1292.00,-89.00,466.20,-1235.00,110.90}},
  390.     {"Richman",                     {72.60,-1404.90,-89.00,225.10,-1235.00,110.90}},
  391.     {"Richman",                     {72.60,-1235.00,-89.00,321.30,-1008.10,110.90}},
  392.     {"Richman",                     {321.30,-1235.00,-89.00,647.50,-1044.00,110.90}},
  393.     {"Richman",                     {321.30,-1044.00,-89.00,647.50,-860.60,110.90}},
  394.     {"Richman",                     {321.30,-860.60,-89.00,687.80,-768.00,110.90}},
  395.     {"Richman",                     {321.30,-768.00,-89.00,700.70,-674.80,110.90}},
  396.     {"Robada Intersection",         {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90}},
  397.     {"Roca Escalante",              {2237.40,2202.70,-89.00,2536.40,2542.50,110.90}},
  398.     {"Roca Escalante",              {2536.40,2202.70,-89.00,2625.10,2442.50,110.90}},
  399.     {"Rockshore East",              {2537.30,676.50,-89.00,2902.30,943.20,110.90}},
  400.     {"Rockshore West",              {1997.20,596.30,-89.00,2377.30,823.20,110.90}},
  401.     {"Rockshore West",              {2377.30,596.30,-89.00,2537.30,788.80,110.90}},
  402.     {"Rodeo",                       {72.60,-1684.60,-89.00,225.10,-1544.10,110.90}},
  403.     {"Rodeo",                       {72.60,-1544.10,-89.00,225.10,-1404.90,110.90}},
  404.     {"Rodeo",                       {225.10,-1684.60,-89.00,312.80,-1501.90,110.90}},
  405.     {"Rodeo",                       {225.10,-1501.90,-89.00,334.50,-1369.60,110.90}},
  406.     {"Rodeo",                       {334.50,-1501.90,-89.00,422.60,-1406.00,110.90}},
  407.     {"Rodeo",                       {312.80,-1684.60,-89.00,422.60,-1501.90,110.90}},
  408.     {"Rodeo",                       {422.60,-1684.60,-89.00,558.00,-1570.20,110.90}},
  409.     {"Rodeo",                       {558.00,-1684.60,-89.00,647.50,-1384.90,110.90}},
  410.     {"Rodeo",                       {466.20,-1570.20,-89.00,558.00,-1385.00,110.90}},
  411.     {"Rodeo",                       {422.60,-1570.20,-89.00,466.20,-1406.00,110.90}},
  412.     {"Rodeo",                       {466.20,-1385.00,-89.00,647.50,-1235.00,110.90}},
  413.     {"Rodeo",                       {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
  414.     {"Royal Casino",                {2087.30,1383.20,-89.00,2437.30,1543.20,110.90}},
  415.     {"San Andreas Sound",           {2450.30,385.50,-100.00,2759.20,562.30,200.00}},
  416.     {"Santa Flora",                 {-2741.00,458.40,-7.60,-2533.00,793.40,200.00}},
  417.     {"Santa Maria Beach",           {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
  418.     {"Santa Maria Beach",           {72.60,-2173.20,-89.00,342.60,-1684.60,110.90}},
  419.     {"Shady Cabin",                 {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00}},
  420.     {"Shady Creeks",                {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00}},
  421.     {"Shady Creeks",                {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00}},
  422.     {"Sobell Rail Yards",           {2749.90,1548.90,-89.00,2923.30,1937.20,110.90}},
  423.     {"Spinybed",                    {2121.40,2663.10,-89.00,2498.20,2861.50,110.90}},
  424.     {"Starfish Casino",             {2437.30,1783.20,-89.00,2685.10,2012.10,110.90}},
  425.     {"Starfish Casino",             {2437.30,1858.10,-39.00,2495.00,1970.80,60.90}},
  426.     {"Starfish Casino",             {2162.30,1883.20,-89.00,2437.30,2012.10,110.90}},
  427.     {"Temple",                      {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
  428.     {"Temple",                      {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90}},
  429.     {"Temple",                      {1252.30,-926.90,-89.00,1357.00,-910.10,110.90}},
  430.     {"Temple",                      {952.60,-1130.80,-89.00,1096.40,-937.10,110.90}},
  431.     {"Temple",                      {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90}},
  432.     {"Temple",                      {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90}},
  433.     {"The Camel's Toe",             {2087.30,1203.20,-89.00,2640.40,1383.20,110.90}},
  434.     {"The Clown's Pocket",          {2162.30,1783.20,-89.00,2437.30,1883.20,110.90}},
  435.     {"The Emerald Isle",            {2011.90,2202.70,-89.00,2237.40,2508.20,110.90}},
  436.     {"The Farm",                    {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90}},
  437.     {"The Four Dragons Casino",     {1817.30,863.20,-89.00,2027.30,1083.20,110.90}},
  438.     {"The High Roller",             {1817.30,1283.20,-89.00,2027.30,1469.20,110.90}},
  439.     {"The Mako Span",               {1664.60,401.70,0.00,1785.10,567.20,200.00}},
  440.     {"The Panopticon",              {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
  441.     {"The Pink Swan",               {1817.30,1083.20,-89.00,2027.30,1283.20,110.90}},
  442.     {"The Sherman Dam",             {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
  443.     {"The Strip",                   {2027.40,863.20,-89.00,2087.30,1703.20,110.90}},
  444.     {"The Strip",                   {2106.70,1863.20,-89.00,2162.30,2202.70,110.90}},
  445.     {"The Strip",                   {2027.40,1783.20,-89.00,2162.30,1863.20,110.90}},
  446.     {"The Strip",                   {2027.40,1703.20,-89.00,2137.40,1783.20,110.90}},
  447.     {"The Visage",                  {1817.30,1863.20,-89.00,2106.70,2011.80,110.90}},
  448.     {"The Visage",                  {1817.30,1703.20,-89.00,2027.40,1863.20,110.90}},
  449.     {"Unity Station",               {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
  450.     {"Valle Ocultado",              {-936.60,2611.40,2.00,-715.90,2847.90,200.00}},
  451.     {"Verdant Bluffs",              {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90}},
  452.     {"Verdant Bluffs",              {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90}},
  453.     {"Verdant Bluffs",              {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
  454.     {"Verdant Meadows",             {37.00,2337.10,-3.00,435.90,2677.90,200.00}},
  455.     {"Verona Beach",                {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
  456.     {"Verona Beach",                {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90}},
  457.     {"Verona Beach",                {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90}},
  458.     {"Verona Beach",                {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90}},
  459.     {"Verona Beach",                {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90}},
  460.     {"Vinewood",                    {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
  461.     {"Vinewood",                    {787.40,-1130.80,-89.00,952.60,-954.60,110.90}},
  462.     {"Vinewood",                    {647.50,-1227.20,-89.00,787.40,-1118.20,110.90}},
  463.     {"Vinewood",                    {647.70,-1416.20,-89.00,787.40,-1227.20,110.90}},
  464.     {"Whitewood Estates",           {883.30,1726.20,-89.00,1098.30,2507.20,110.90}},
  465.     {"Whitewood Estates",           {1098.30,1726.20,-89.00,1197.30,2243.20,110.90}},
  466.     {"Willowfield",                 {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90}},
  467.     {"Willowfield",                 {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90}},
  468.     {"Willowfield",                 {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90}},
  469.     {"Willowfield",                 {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90}},
  470.     {"Willowfield",                 {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90}},
  471.     {"Willowfield",                 {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90}},
  472.     {"Willowfield",                 {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}},
  473.     {"Yellow Bell Station",         {1377.40,2600.40,-21.90,1492.40,2687.30,78.00}},
  474.     {"Los Santos",                  {44.60,-2892.90,-242.90,2997.00,-768.00,900.00}},
  475.     {"Las Venturas",                {869.40,596.30,-242.90,2997.00,2993.80,900.00}},
  476.     {"Bone County",                 {-480.50,596.30,-242.90,869.40,2993.80,900.00}},
  477.     {"Tierra Robada",               {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00}},
  478.     {"Tierra Robada",               {-1213.90,596.30,-242.90,-480.50,1659.60,900.00}},
  479.     {"San Fierro",                  {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00}},
  480.     {"Red County",                  {-1213.90,-768.00,-242.90,2997.00,596.30,900.00}},
  481.     {"Flint County",                {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00}},
  482.     {"Whetstone",                   {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
  483. };
  484.  
  485. new
  486.     Float:gGasStationLocations[13][3] =
  487. {
  488. {1004.0070,-939.3102,42.1797}, // LS
  489. {1944.3260,-1772.9254,13.3906}, // LS
  490. {-90.5515,-1169.4578,2.4079}, // LS
  491. {-1609.7958,-2718.2048,48.5391}, // LS
  492. {-2029.4968,156.4366,28.9498}, // SF
  493. {-2408.7590,976.0934,45.4175}, // SF
  494. {-2243.9629,-2560.6477,31.8841}, // LSSF
  495. {-1676.6323,414.0262,6.9484}, // LSSF
  496. {2202.2349,2474.3494,10.5258}, // LV
  497. {614.9333,1689.7418,6.6968}, // LV
  498. {-1328.8250,2677.2173,49.7665}, // LV
  499. {70.3882,1218.6783,18.5165}, // LV
  500. {2113.7390,920.1079,10.5255} // LV
  501. };
  502.  
  503. public OnFilterScriptInit()
  504. {
  505.     for(new c = 0;c < MAX_VEHICLES;c++)
  506.     {
  507.         Gas[c] = GasMax;
  508.     }
  509.     AddStaticVehicle(411,1526.2845,-1681.7782,13.1109,179.8758,64,1);
  510.     stoppedvehtimer = SetTimer("StoppedVehicle", RunOutTime, 1);
  511.     checkgastimer = SetTimer("CheckGas", RunOutTime, 1);
  512.     timerspeedo = SetTimer("Speedo",500,1);
  513.  
  514.     Combust = TextDrawCreate(141.000000, 401.000000, " ");
  515.     TextDrawBackgroundColor(Combust, 255);
  516.     TextDrawFont(Combust, 2);
  517.     TextDrawLetterSize(Combust, 0.160000, 2.100000);
  518.     TextDrawColor(Combust, -1);
  519.     TextDrawSetOutline(Combust, 1);
  520.     TextDrawSetProportional(Combust, 1);
  521.  
  522.     Velo = TextDrawCreate(140.000000, 364.000000, " ");
  523.     TextDrawBackgroundColor(Velo, 255);
  524.     TextDrawFont(Velo, 2);
  525.     TextDrawLetterSize(Velo, 0.599999, 4.699997);
  526.     TextDrawColor(Velo, -1);
  527.     TextDrawSetOutline(Velo, 1);
  528.     TextDrawSetProportional(Velo, 1);
  529.  
  530.     Kmh = TextDrawCreate(187.000000, 378.000000, "  ~y~KM~i~/~y~H");
  531.     TextDrawBackgroundColor(Kmh, 255);
  532.     TextDrawFont(Kmh, 2);
  533.     TextDrawLetterSize(Kmh, 0.190000, 2.799999);
  534.     TextDrawColor(Kmh, -1);
  535.     TextDrawSetOutline(Kmh, 1);
  536.     TextDrawSetProportional(Kmh, 1);
  537.  
  538.     Veiculo = TextDrawCreate(141.000000, 360.000000, " ");
  539.     TextDrawBackgroundColor(Veiculo, 255);
  540.     TextDrawFont(Veiculo, 2);
  541.     TextDrawLetterSize(Veiculo, 0.250000, 1.200000);
  542.     TextDrawColor(Veiculo, -1);
  543.     TextDrawSetOutline(Veiculo, 1);
  544.     TextDrawSetProportional(Veiculo, 1);
  545.  
  546.     Localidades = TextDrawCreate(63.000000, 330.000000, " ");
  547.     TextDrawBackgroundColor(Localidades, 255);
  548.     TextDrawFont(Localidades, 2);
  549.     TextDrawLetterSize(Localidades, 0.210000, 1.000000);
  550.     TextDrawColor(Localidades, -1);
  551.     TextDrawSetOutline(Localidades, 1);
  552.     TextDrawSetProportional(Localidades, 1);
  553.  
  554.     FitaRodape = TextDrawCreate(651.000000, 430.000000, "_");
  555.     TextDrawBackgroundColor(FitaRodape, 255);
  556.     TextDrawFont(FitaRodape, 1);
  557.     TextDrawLetterSize(FitaRodape, 0.500000, 0.000000);
  558.     TextDrawColor(FitaRodape, -1);
  559.     TextDrawSetOutline(FitaRodape, 0);
  560.     TextDrawSetProportional(FitaRodape, 1);
  561.     TextDrawSetShadow(FitaRodape, 1);
  562.     TextDrawUseBox(FitaRodape, 1);
  563.     TextDrawBoxColor(FitaRodape, 1970632191);
  564.     TextDrawTextSize(FitaRodape, -87.000000, 23.000000);
  565.  
  566.     for(new i; i < MAX_PLAYERS; i ++)
  567.     {
  568.         if(IsPlayerConnected(i))
  569.         {
  570.             TextDrawShowForPlayer(i, Combust);
  571.             TextDrawShowForPlayer(i, Velo);
  572.             TextDrawShowForPlayer(i, Kmh);
  573.             TextDrawShowForPlayer(i, Veiculo);
  574.             TextDrawShowForPlayer(i, Localidades);
  575.             TextDrawShowForPlayer(i, FitaRodape);
  576.         }
  577.     }
  578.     return 1;
  579. }
  580.  
  581. public OnFilterScriptExit()
  582. {
  583.     KillTimer(stoppedvehtimer);
  584.     KillTimer(checkgastimer);
  585.     KillTimer(timerspeedo);
  586.     TextDrawHideForAll(Combust);
  587.     TextDrawDestroy(Combust);
  588.     TextDrawHideForAll(Velo);
  589.     TextDrawDestroy(Velo);
  590.     TextDrawHideForAll(Kmh);
  591.     TextDrawDestroy(Kmh);
  592.     TextDrawHideForAll(Veiculo);
  593.     TextDrawDestroy(Veiculo);
  594.     TextDrawHideForAll(Localidades);
  595.     TextDrawDestroy(Localidades);
  596.     TextDrawHideForAll(FitaRodape);
  597.     TextDrawDestroy(FitaRodape);
  598.     return 1;
  599. }
  600.  
  601. public OnPlayerConnect(playerid)
  602. {
  603.     TextDrawShowForPlayer(playerid, FitaRodape);
  604.     return 1;
  605. }
  606.  
  607. public OnPlayerExitVehicle(playerid, vehicleid)
  608. {
  609.     TextDrawHideForAll(Combust);
  610.     TextDrawHideForAll(Velo);
  611.     TextDrawHideForAll(Kmh);
  612.     TextDrawHideForAll(Veiculo);
  613.     TextDrawHideForAll(Localidades);
  614.     return 1;
  615. }
  616.  
  617. public Speedo()
  618. {
  619.     for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
  620.     {
  621.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  622.         {
  623.             TextDrawHideForPlayer(playerid, Velo);
  624.             format(string,sizeof(string),"~w~%d", VelocidadeKM(playerid));
  625.             TextDrawSetString(Velo, string);
  626.             TextDrawShowForPlayer(playerid, Velo);
  627.  
  628.             format(string,sizeof(string),"~p~%s", Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
  629.             TextDrawSetString(Veiculo, string);
  630.             TextDrawShowForPlayer(playerid, Veiculo);
  631.  
  632.             GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
  633.             format(string,sizeof(string),"~w~%s", zone);
  634.             TextDrawSetString(Localidades, string);
  635.             TextDrawShowForPlayer(playerid, Localidades);
  636.  
  637.             format(string,sizeof(string),"~g~Combustivel  ~r~%d% ~w~ L", Gas[GetPlayerVehicleID(playerid)]);
  638.             TextDrawSetString(Combust, string);
  639.             TextDrawShowForPlayer(playerid, Combust);
  640.  
  641.             format(string,sizeof(string),"  ~y~KM~i~/~y~H", Gas[GetPlayerVehicleID(playerid)]);
  642.             TextDrawSetString(Kmh, string);
  643.             TextDrawShowForPlayer(playerid, Kmh);
  644.         }
  645.         else
  646.         {
  647.             TextDrawHideForPlayer(playerid, Combust);
  648.             TextDrawHideForPlayer(playerid, Velo);
  649.             TextDrawHideForPlayer(playerid, Kmh);
  650.             TextDrawHideForPlayer(playerid, Veiculo);
  651.             TextDrawHideForPlayer(playerid, Localidades);
  652.         }
  653.     }
  654.     return true;
  655. }
  656.  
  657. public Float:GetDistanceBetweenPlayerToPoint(p1,Float:px,Float:py,Float:pz)
  658. {
  659.     if(!IsPlayerConnected(p1))
  660.         return -1.00;
  661.  
  662.     GetPlayerPos(p1,x1,y1,z1);
  663.     x2 = px;
  664.     y2 = py;
  665.     z2 = pz;
  666.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  667. }
  668.  
  669. public NoPosto(playerid)
  670. {
  671.     if(IsPlayerConnected(playerid))
  672.     {
  673.         if(IsPlayerInRangeOfPoint(playerid,6.0,1004.0070,-939.3102,42.1797) || IsPlayerInRangeOfPoint(playerid,6.0,1944.3260,-1772.9254,13.3906))
  674.         {//LS
  675.             return 1;
  676.         }
  677.         else if(IsPlayerInRangeOfPoint(playerid,6.0,-90.5515,-1169.4578,2.4079) || IsPlayerInRangeOfPoint(playerid,6.0,-1609.7958,-2718.2048,48.5391))
  678.         {//LS
  679.             return 1;
  680.         }
  681.         else if(IsPlayerInRangeOfPoint(playerid,6.0,-2029.4968,156.4366,28.9498) || IsPlayerInRangeOfPoint(playerid,8.0,-2408.7590,976.0934,45.4175))
  682.         {//SF
  683.             return 1;
  684.         }
  685.         else if(IsPlayerInRangeOfPoint(playerid,5.0,-2243.9629,-2560.6477,31.8841) || IsPlayerInRangeOfPoint(playerid,8.0,-1676.6323,414.0262,6.9484))
  686.         {//Between LS and SF
  687.             return 1;
  688.         }
  689.         else if(IsPlayerInRangeOfPoint(playerid,6.0,2202.2349,2474.3494,10.5258) || IsPlayerInRangeOfPoint(playerid,10.0,614.9333,1689.7418,6.6968))
  690.         {//LV
  691.             return 1;
  692.         }
  693.         else if(IsPlayerInRangeOfPoint(playerid,8.0,-1328.8250,2677.2173,49.7665) || IsPlayerInRangeOfPoint(playerid,6.0,70.3882,1218.6783,18.5165))
  694.         {//LV
  695.             return 1;
  696.         }
  697.         else if(IsPlayerInRangeOfPoint(playerid,8.0,2113.7390,920.1079,10.5255) || IsPlayerInRangeOfPoint(playerid,6.0,-1327.7218,2678.8723,50.0625))
  698.         {//LV
  699.             return 1;
  700.         }
  701.         else if(IsPlayerInRangeOfPoint(playerid,8.0,2146.5759,2750.8442,10.6447) || IsPlayerInRangeOfPoint(playerid,6.0,2146.8779,2739.6157,10.6435))
  702.         {//LV2
  703.             return 1;
  704.         }
  705.         else if(IsPlayerInRangeOfPoint(playerid,8.0,1595.3046,2191.1331,10.6454) || IsPlayerInRangeOfPoint(playerid,6.0,1596.3274,2206.7070,10.6449))
  706.         {//LV3
  707.             return 1;
  708.         }
  709.         else if(IsPlayerInRangeOfPoint(playerid,8.0,-736.9305,2742.6138,47.0158))
  710.         {//Landtankstelle
  711.             return 1;
  712.         }
  713.     }
  714.     return 0;
  715. }
  716.  
  717. public CheckGas()
  718. {
  719.     for(new i=0;i<MAX_PLAYERS;i++)
  720.     {
  721.         if(IsPlayerConnected(i))
  722.         {
  723.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  724.             {
  725.                 if(Gas[GetPlayerVehicleID(i)] >= 1)
  726.                 {
  727.                     Gas[GetPlayerVehicleID(i)]--;
  728.                 }
  729.             }
  730.         }
  731.     }
  732.     return 1;
  733. }
  734.  
  735. public Fillup()
  736. {
  737.     for(new i=0; i<MAX_PLAYERS; i++)
  738.     {
  739.         if(IsPlayerConnected(i))
  740.         {
  741.             FillUp = GasMax - Gas[GetPlayerVehicleID(i)];
  742.             if(Refueling[i] == 1)
  743.             {
  744.                 FillUpPrice = FillUp * 3;
  745.                 if(GetPlayerMoney(i) >= FillUpPrice)
  746.                 {
  747.                     Gas[GetPlayerVehicleID(i)] += FillUp;
  748.                     format(string,sizeof(string), "Você Reabasteceu Seu Veiculo Por $%d .", FillUpPrice);
  749.                     SendClientMessage(i, 0x33CCFFAA, string);
  750.                     GivePlayerMoney(i, -FillUpPrice);
  751.                     if(FillUpPrice > 0)
  752.                     FillUpPrice = 0;
  753.                     Refueling[i] = 0;
  754.                 }
  755.                 else
  756.                 {
  757.                     format(string,sizeof(string), "Você Não Tem $%d Para Reabastecer Seu Veiculo", FillUpPrice);
  758.                     SendClientMessage(i, 0x33CCFFAA, string);
  759.                 }
  760.             }
  761.         }
  762.     }
  763.     return 1;
  764. }
  765.  
  766. public StoppedVehicle()
  767. {
  768.     for(new i=0; i<MAX_PLAYERS; i++)
  769.     {
  770.         if(IsPlayerConnected(i))
  771.         {
  772.             if(IsPlayerInAnyVehicle(i))
  773.             {
  774.                 GetPlayerPos(i, x, y, z);
  775.                 distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
  776.                 value = floatround(distance * 3600);
  777.                 if(UpdateSeconds > 1)
  778.                 {
  779.                     value = floatround(value / UpdateSeconds);
  780.                 }
  781.                 if(value == 0)
  782.                 {
  783.                     Gas[GetPlayerVehicleID(i)]++;
  784.                 }
  785.                 SavePlayerPos[i][LastX] = x;
  786.                 SavePlayerPos[i][LastY] = y;
  787.                 SavePlayerPos[i][LastZ] = z;
  788.             }
  789.         }
  790.     }
  791.     return 1;
  792. }
  793.  
  794.  
  795. public OnPlayerStateChange(playerid, newstate, oldstate)
  796. {
  797.     if(oldstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_PASSENGER)
  798.     {
  799.         TextDrawHideForPlayer(playerid, Combust);
  800.         TextDrawHideForPlayer(playerid, Velo);
  801.         TextDrawHideForPlayer(playerid, Kmh);
  802.         TextDrawHideForPlayer(playerid, Veiculo);
  803.         TextDrawHideForPlayer(playerid, Localidades);
  804.     }
  805.     return 1;
  806. }
  807.  
  808.  
  809. CMD:abastecer(playerid, params[])
  810. {
  811.     if(IsPlayerConnected(playerid))
  812.     {
  813.         if(NoPosto(playerid))
  814.         {
  815.             olddistance = 999999;
  816.             for(new i = 0; i < sizeof(gGasStationLocations); i++)
  817.             {
  818.                 GasX = gGasStationLocations[i][0];
  819.                 GasY = gGasStationLocations[i][1];
  820.                 GasZ = gGasStationLocations[i][2];
  821.                 newdistance = GetDistanceBetweenPlayerToPoint(playerid,GasX,GasY,GasZ);
  822.                 if (newdistance < olddistance)
  823.                 {
  824.                     olddistance = newdistance;
  825.                     closest = i;
  826.                 }
  827.             }
  828.             GameTextForPlayer(playerid,"~r~Reabastecendo ~w~Aguarde", 2000, 3);
  829.             SetTimer("Fillup", RefuelWait, 0);
  830.             gGasBiz[playerid] = closest+12;
  831.             Refueling[playerid] = 1;
  832.             }
  833.             else
  834.             {
  835.                 SendClientMessage(playerid, 0xAFAFAFAA, "Você Não Esta Em Posto De Combustivel");
  836.             }
  837.     }
  838.     return 1;
  839. }
  840.  
  841.  
  842. stock VelocidadeKM(playerid)
  843. {
  844.     if(IsPlayerInAnyVehicle(playerid))
  845.     {
  846.         GetVehicleVelocity(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
  847.         pos[3] = floatmul(floatsqroot(floatadd(floatadd(floatpower(pos[0], 2), floatpower(pos[1], 2)),  floatpower(pos[2], 2))), 170.0);
  848.         spe = floatround(pos[3] * 1);
  849.     }
  850.     else
  851.         return false;
  852.     return spe;
  853. }
  854.  
  855. stock IsPlayerInZone(playerid, zoneada[])
  856. {
  857.     GetPlayer3DZone(playerid, TmpZone, sizeof(TmpZone));
  858.     for(new i = 0; i != sizeof(gSAZones); i++)
  859.     {
  860.         if(strfind(TmpZone, zoneada, true) != -1)
  861.             return 1;
  862.     }
  863.     return 0;
  864. }
  865.  
  866. stock GetPlayer2DZone(playerid, zoneada[], len)
  867. {
  868.     GetPlayerPos(playerid, x, y, z);
  869.     for(new i = 0; i != sizeof(gSAZones); i++ )
  870.     {
  871.         if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
  872.         {
  873.             return format(zoneada, len, gSAZones[i][SAZONE_NAME], 0);
  874.         }
  875.     }
  876.     return 0;
  877. }
  878.  
  879. stock GetPlayer3DZone(playerid, zoneada[], len)
  880. {
  881.     GetPlayerPos(playerid, x, y, z);
  882.     for(new i = 0; i != sizeof(gSAZones); i++ )
  883.     {
  884.         if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4] && z >= gSAZones[i][SAZONE_AREA][2] && z <= gSAZones[i][SAZONE_AREA][5])
  885.         {
  886.             return format(zoneada, len, gSAZones[i][SAZONE_NAME], 0);
  887.         }
  888.     }
  889.     return 0;
  890. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement