Advertisement
Guest User

ETBCars by EvilToastBrot

a guest
Dec 3rd, 2010
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 81.75 KB | None | 0 0
  1. // ETB Cars by EvilToastBrot.
  2.  
  3. #include <a_samp>
  4. #include <SII>
  5. #include <utils>
  6.  
  7. // Einstellungen
  8. #define MIN_ID 100 // Minimale ID bei einem Nummernschild
  9. #define MAX_ID 999 // Maximale ID bei einem Nummernschild
  10. #define MaxCarsOwn 3 // Maximale Cars, die ein Spieler besitzen kann. Standart: 3
  11. #define MaxCarsRent 2 // Maximale Cars, von denen ein Spieler den Schlüssel haben kann. Standart: 2
  12. new NSPraefix[5] = "ETB"; // Präfix vor dem Nummernschild. Z.B. : ETB-AB-123. NSPraefix ist hier das "ETB"
  13. new Float:NSHoehe = 1.25; // Höhe vom Nummernschild am Fahrzeug. Standart: 1.25
  14.  
  15. // Dialoge
  16. #define BuyDiag 3
  17.  
  18. // Color Defines
  19. #define COLOR_GREY 0xAFAFAFAA
  20. #define COLOR_LIGHTBLUE 0x33CCFFAA
  21. #define COLOR_YELLOW 0xFFFF00AA
  22. #define COLOR_NS 0x40B42CFF
  23. #define COLOR_WHITE 0xFFFFFFAA
  24. #define COLOR_RED 0xAA3333AA
  25. #define COLOR_GREEN 0x33AA33AA
  26. #define COLOR_TS 0x000000B2
  27. #define MAX_ZONE_NAME 40
  28.  
  29. // Forwards
  30. forward SaveCar(i);
  31. forward LoadCar(i);
  32. forward Save();
  33. forward AddComponents(i);
  34. forward IsAWheel(componentid);
  35. forward IsAExhaust(componentid);
  36. forward IsASideR(componentid);
  37. forward IsASideL(componentid);
  38. forward IsAFB(componentid);
  39. forward IsARB(componentid);
  40. forward IsASpoiler(componentid);
  41. forward IsARoof(componentid);
  42. forward IsAtGasStation(playerid);
  43. forward Gas();
  44. forward IsAPlane(carid);
  45. forward IsABoat(carid);
  46. forward FillGas(OldFuel, i, playerid);
  47. forward Speedometer(playerid);
  48. forward IsANoTachoVeh(vehid);
  49. forward CreateNumber();
  50. forward vrandom(min, max);
  51. forward Respawn(vehicleid);
  52. forward CheckLock();
  53. // Enums
  54. enum car_info
  55. {
  56.     model,
  57.     Float:px,
  58.     Float:py,
  59.     Float:pz,
  60.     Float:pa,
  61.     vid,
  62.     Key[MAX_PLAYER_NAME],
  63.     Key2[MAX_PLAYER_NAME],
  64.     c1,
  65.     c2,
  66.     Text3D:NS,
  67.     Cars,
  68.     ABC[11],
  69.     Fuel,
  70.     NSID,
  71.     BuyPrice,
  72.     Lock,
  73.     Nitro,
  74.     Hyd,
  75.     Wheel,
  76.     Auspuff,
  77.     SeiteL,
  78.     SeiteR,
  79.     FB,
  80.     RB,
  81.     Spoiler,
  82.     Roof,
  83.     Hood,
  84.     Vent,
  85.     Lamp,
  86.     Rented
  87. }
  88. enum showcars_info
  89. {
  90.     mmodel,
  91.     Float:Carx,
  92.     Float:Cary,
  93.     Float:Carz,
  94.     Float:Cara,
  95.     Color1,
  96.     Color2,
  97.     CarPreis,
  98.     CarName[30],
  99.     Text3D:lbl,
  100.     v_id,
  101. }
  102. new PlayerCar[MAX_VEHICLES][car_info];
  103. new ShowCars[][showcars_info] = {
  104. // Teure Cars --> Jefferson Motel
  105. {411, 2133.9138, -1143.7885, 24.6356, 39.3993, 11, 11, 123000, "Infernus"},
  106. {541, 2135.8252, -1140.0043, 24.9697, 38.1644, 58, 8, 96000, "Bullet"},
  107. {415, 2136.5181, -1135.4103, 25.4611, 41.7207, 25, 1, 105000, "Cheetah"},
  108. {451, 2136.0132, -1130.2549, 25.3655, 44.7183, 125, 125, 152000, "Turismo"},
  109. {559, 2118.9443, -1142.8414, 24.4125, 325.7177, 58, 8, 85000, "Jester"},
  110. {603, 2118.2944, -1137.7709, 24.9499, 326.2623, 69, 1, 83000, "Phoenix"},
  111. {506, 2119.0291, -1131.2905, 25.0035, 327.8102, 6, 6, 91000, "Super GT"},
  112. {477, 2119.6836, -1125.5911, 25.1389, 321.6796, 94, 1, 80500, "ZR-350"},
  113. // Billige Cars --> Grotti
  114. {400,563.0027,-1289.0051,17.3406,359.3714,123,1, 30000, "Landstalker"},
  115. {402,556.0446,-1288.9548,17.0799,359.4561,13,13, 47000, "Buffalo"},
  116. {404,549.2369,-1288.6235,16.9810,359.7011,119,50, 21000, "Perenniel"},
  117. {421,542.5278,-1288.9679,17.1247,358.3234,13,1, 26000, "Washington"},
  118. {426,535.5063,-1288.5604,16.9853,358.5514,42,42, 31000, "Premier"},
  119. {439,528.6777,-1288.6896,17.1379,356.7412,8,17, 33500, "Staillon"},
  120. {445,521.8549,-1288.6853,17.1172,0.2166,35,35, 29500, "Admiral"},
  121. // Bikes --> Otto Cars
  122. {581,-1664.4714,1224.5912,13.2717,192.2560,58,1, 34000, "BF-400"},
  123. {522,-1666.4797,1221.6826,13.2515,263.8130,7,79, 59000, "NRG-500"},
  124. {461,-1648.9540,1207.0366,13.2605,38.4243,37,1, 20000, "PCJ-600"},
  125. {463,-1666.5693,1205.0956,13.2122,320.4418,84,84, 27500, "Freeway"},
  126. {468,-1670.1582,1205.4038,20.8252,304.4069,46,46,18500, "Sanchez"},
  127. {471,-1664.9088,1222.5028,20.6384,234.7174,103,111, 19000, "Quad"},
  128. {521,-1649.4164,1206.8403,20.7161,51.8923,75,13, 29000, "FCR-900"},
  129. {462,-1660.6293,1204.6680,20.7568,310.3289,13,13, 3500, "Faggio"},
  130. {586,-1655.2209,1203.9518,20.6685,317.3647,122,1, 17000, "Wayfarer"}
  131. }; // Die ShowCars. Struktur: ModelID, x, y, z, a, color1, color2, preis, name
  132.  
  133. new const Float:CarRanges[][] = {
  134. {2127.0771,-1134.5930,25.5472}, // Jefferson
  135. {547.0040,-1280.7773,17.2482}, // Grotti
  136. {-1657.1593,1213.0844,21.1563} // Otto Cars
  137. }; // Die Ranges für IsPlayerInRangeOfPoint um zu prüfen, an welchem Autohaus er ist.
  138.  
  139. new const Float:CarSpawns[][] = {
  140. {2127.2217,-1144.6227,24.6127,350.7450}, // Jefferson
  141. {558.6084,-1261.9918,16.9693,13.7288}, // Grotti
  142. {-1644.6960,1304.5389,7.0285,134.1403} // Otto Cars
  143. }; // Die Spawns für die Fahrzeuge nach dem Kauf
  144.  
  145. new ABCD[26][0] = {
  146. {"A"}, {"B"}, {"C"}, {"D"}, {"E"}, {"F"}, {"G"}, {"H"}, {"I"}, {"J"}, {"K"}, {"L"}, {"M"},
  147. {"N"}, {"O"}, {"P"}, {"Q"}, {"R"}, {"S"}, {"T"}, {"U"}, {"V"}, {"W"}, {"X"}, {"Y"}, {"Z"}
  148. };
  149.  
  150. new PlayerVehicle[212][] = {
  151. "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana",
  152. "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat",
  153. "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife",
  154. "Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo",
  155. "Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
  156. "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
  157. "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito",
  158. "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring",
  159. "Sandking", "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B",
  160. "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster","Stunt",  "Tanker",
  161. "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  162. "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak",
  163. "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit",
  164. "Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
  165. "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway",
  166. "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog",
  167. "Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
  168. "Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A",
  169. "Luggage Trailer B", "Stairs", "Boxville", "Tiller", "Utility Trailer"
  170. };
  171. enum MainZone
  172. {
  173.     Zone_Name[28],
  174.     Float:Zone_Area[6]
  175. };
  176. static const SA_GPS_ZONE_NAMES[][MainZone] = {
  177.  
  178.     {"The Big Ear",                 {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
  179.     {"Aldea Malvada",               {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
  180.     {"Angel Pine",                  {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
  181.     {"Arco del Oeste",              {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
  182.     {"Avispa Country Club",         {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
  183.     {"Avispa Country Club",         {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
  184.     {"Avispa Country Club",         {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
  185.     {"Avispa Country Club",         {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10}},
  186.     {"Avispa Country Club",         {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10}},
  187.     {"Avispa Country Club",         {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70}},
  188.     {"Back o Beyond",               {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00}},
  189.     {"Battery Point",               {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00}},
  190.     {"Bayside",                     {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
  191.     {"Bayside Marina",              {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00}},
  192.     {"Beacon Hill",                 {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50}},
  193.     {"Blackfield",                  {964.30,1203.20,-89.00,1197.30,1403.20,110.90}},
  194.     {"Blackfield",                  {964.30,1403.20,-89.00,1197.30,1726.20,110.90}},
  195.     {"Blackfield Chapel",           {1375.60,596.30,-89.00,1558.00,823.20,110.90}},
  196.     {"Blackfield Chapel",           {1325.60,596.30,-89.00,1375.60,795.00,110.90}},
  197.     {"Blackfield",                  {1197.30,1044.60,-89.00,1277.00,1163.30,110.90}},
  198.     {"Blackfield",                  {1166.50,795.00,-89.00,1375.60,1044.60,110.90}},
  199.     {"Blackfield",                  {1277.00,1044.60,-89.00,1315.30,1087.60,110.90}},
  200.     {"Blackfield",                  {1375.60,823.20,-89.00,1457.30,919.40,110.90}},
  201.     {"Blueberry",                   {104.50,-220.10,2.30,349.60,152.20,200.00}},
  202.     {"Blueberry",                   {19.60,-404.10,3.80,349.60,-220.10,200.00}},
  203.     {"Blueberry Acres",             {-319.60,-220.10,0.00,104.50,293.30,200.00}},
  204.     {"Caligula's Palace",           {2087.30,1543.20,-89.00,2437.30,1703.20,110.90}},
  205.     {"Caligula's Palace",           {2137.40,1703.20,-89.00,2437.30,1783.20,110.90}},
  206.     {"Calton Heights",              {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00}},
  207.     {"Chinatown",                   {-2274.10,578.30,-7.60,-2078.60,744.10,200.00}},
  208.     {"City Hall",                   {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
  209.     {"Come-A-Lot",                  {2087.30,943.20,-89.00,2623.10,1203.20,110.90}},
  210.     {"Commerce",                    {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90}},
  211.     {"Commerce",                    {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90}},
  212.     {"Commerce",                    {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90}},
  213.     {"Commerce",                    {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90}},
  214.     {"Commerce",                    {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90}},
  215.     {"Commerce",                    {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90}},
  216.     {"Conference Center",           {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90}},
  217.     {"Conference Center",           {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90}},
  218.     {"Cranberry Station",           {-2007.80,56.30,0.00,-1922.00,224.70,100.00}},
  219.     {"Creek",                       {2749.90,1937.20,-89.00,2921.60,2669.70,110.90}},
  220.     {"Dillimore",                   {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
  221.     {"Doherty",                     {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
  222.     {"Doherty",                     {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00}},
  223.     {"Downtown",                    {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00}},
  224.     {"Downtown",                    {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00}},
  225.     {"Downtown",                    {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00}},
  226.     {"Downtown",                    {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00}},
  227.     {"Downtown",                    {-2078.60,578.30,-7.60,-1499.80,744.20,200.00}},
  228.     {"Downtown",                    {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
  229.     {"Downtown LS",                 {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
  230.     {"Downtown LS",                 {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90}},
  231.     {"Downtown LS",                 {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90}},
  232.     {"Downtown LS",                 {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90}},
  233.     {"Downtown LS",                 {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90}},
  234.     {"Downtown LS",                 {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90}},
  235.     {"Downtown LS",                 {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90}},
  236.     {"Downtown LS",                 {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90}},
  237.     {"Downtown LS",                 {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90}},
  238.     {"East Beach",                  {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
  239.     {"East Beach",                  {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90}},
  240.     {"East Beach",                  {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90}},
  241.     {"East Beach",                  {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90}},
  242.     {"East Los Santos",             {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90}},
  243.     {"East Los Santos",             {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90}},
  244.     {"East Los Santos",             {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90}},
  245.     {"East Los Santos",             {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90}},
  246.     {"East Los Santos",             {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90}},
  247.     {"East Los Santos",             {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90}},
  248.     {"East Los Santos",             {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90}},
  249.     {"Easter Basin",                {-1794.90,249.90,-9.10,-1242.90,578.30,200.00}},
  250.     {"Easter Basin",                {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00}},
  251.     {"Easter Bay AP",               {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00}},
  252.     {"Easter Bay AP",               {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00}},
  253.     {"Easter Bay AP",               {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00}},
  254.     {"Easter Bay AP",               {-1242.90,-50.00,0.00,-1213.90,578.30,200.00}},
  255.     {"Easter Bay AP",               {-1213.90,-50.00,-4.50,-947.90,578.30,200.00}},
  256.     {"Easter Bay AP",               {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40}},
  257.     {"Easter Bay AP",               {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40}},
  258.     {"Easter Bay AP",               {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40}},
  259.     {"Easter Bay Chemicals",        {-1132.80,-768.00,0.00,-956.40,-578.10,200.00}},
  260.     {"Easter Bay Chemicals",        {-1132.80,-787.30,0.00,-956.40,-768.00,200.00}},
  261.     {"Castillo del Diablo",         {-464.50,2217.60,0.00,-208.50,2580.30,200.00}},
  262.     {"Castillo del Diablo",         {-208.50,2123.00,-7.60,114.00,2337.10,200.00}},
  263.     {"Castillo del Diablo",         {-208.50,2337.10,0.00,8.40,2487.10,200.00}},
  264.     {"El Corona",                   {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90}},
  265.     {"El Corona",                   {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90}},
  266.     {"El Quebrados",                {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00}},
  267.     {"Esplanade East",              {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00}},
  268.     {"Esplanade East",              {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00}},
  269.     {"Esplanade East",              {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30}},
  270.     {"Esplanade North",             {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00}},
  271.     {"Esplanade North",             {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00}},
  272.     {"Esplanade North",             {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00}},
  273.     {"Fallen Tree",                 {-792.20,-698.50,-5.30,-452.40,-380.00,200.00}},
  274.     {"Fallow Bridge",               {434.30,366.50,0.00,603.00,555.60,200.00}},
  275.     {"Fern Ridge",                  {508.10,-139.20,0.00,1306.60,119.50,200.00}},
  276.     {"Financial",                   {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00}},
  277.     {"Fisher's Lagoon",             {1916.90,-233.30,-100.00,2131.70,13.80,200.00}},
  278.     {"Flint Intersection",          {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
  279.     {"Flint Range",                 {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
  280.     {"Fort Carson",                 {-376.20,826.30,-3.00,123.70,1220.40,200.00}},
  281.     {"Foster Valley",               {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00}},
  282.     {"Foster Valley",               {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00}},
  283.     {"Foster Valley",               {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00}},
  284.     {"Foster Valley",               {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00}},
  285.     {"Frederick Bridge",            {2759.20,296.50,0.00,2774.20,594.70,200.00}},
  286.     {"Gant Bridge",                 {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00}},
  287.     {"Gant Bridge",                 {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00}},
  288.     {"Ganton",                      {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90}},
  289.     {"Ganton",                      {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
  290.     {"Garcia",                      {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00}},
  291.     {"Garcia",                      {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00}},
  292.     {"Garver Bridge",               {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90}},
  293.     {"Garver Bridge",               {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90}},
  294.     {"Garver Bridge",               {-1499.80,696.40,-179.60,-1339.80,925.30,20.30}},
  295.     {"Glen Park",                   {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90}},
  296.     {"Glen Park",                   {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90}},
  297.     {"Glen Park",                   {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
  298.     {"Green Palms",                 {176.50,1305.40,-3.00,338.60,1520.70,200.00}},
  299.     {"Greenglass College",          {964.30,1044.60,-89.00,1197.30,1203.20,110.90}},
  300.     {"Greenglass College",          {964.30,930.80,-89.00,1166.50,1044.60,110.90}},
  301.     {"Hampton Barns",               {603.00,264.30,0.00,761.90,366.50,200.00}},
  302.     {"Hankypanky Point",            {2576.90,62.10,0.00,2759.20,385.50,200.00}},
  303.     {"Harry Gold Parkway",          {1777.30,863.20,-89.00,1817.30,2342.80,110.90}},
  304.     {"Hashbury",                    {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00}},
  305.     {"Hilltop Farm",                {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
  306.     {"Hunter Quarry",               {337.20,710.80,-115.20,860.50,1031.70,203.70}},
  307.     {"Idlewood",                    {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90}},
  308.     {"Idlewood",                    {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90}},
  309.     {"Idlewood",                    {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90}},
  310.     {"Idlewood",                    {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90}},
  311.     {"Idlewood",                    {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90}},
  312.     {"Idlewood",                    {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
  313.     {"Jefferson",                   {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90}},
  314.     {"Jefferson",                   {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90}},
  315.     {"Jefferson",                   {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90}},
  316.     {"Jefferson",                   {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90}},
  317.     {"Jefferson",                   {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90}},
  318.     {"Jefferson",                   {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
  319.     {"Julius Thruway",              {2623.10,943.20,-89.00,2749.90,1055.90,110.90}},
  320.     {"Julius Thruway",              {2685.10,1055.90,-89.00,2749.90,2626.50,110.90}},
  321.     {"Julius Thruway",              {2536.40,2442.50,-89.00,2685.10,2542.50,110.90}},
  322.     {"Julius Thruway",              {2625.10,2202.70,-89.00,2685.10,2442.50,110.90}},
  323.     {"Julius Thruway",              {2498.20,2542.50,-89.00,2685.10,2626.50,110.90}},
  324.     {"Julius Thruway",              {2237.40,2542.50,-89.00,2498.20,2663.10,110.90}},
  325.     {"Julius Thruway",              {2121.40,2508.20,-89.00,2237.40,2663.10,110.90}},
  326.     {"Julius Thruway",              {1938.80,2508.20,-89.00,2121.40,2624.20,110.90}},
  327.     {"Julius Thruway",              {1534.50,2433.20,-89.00,1848.40,2583.20,110.90}},
  328.     {"Julius Thruway",              {1848.40,2478.40,-89.00,1938.80,2553.40,110.90}},
  329.     {"Julius Thruway",              {1704.50,2342.80,-89.00,1848.40,2433.20,110.90}},
  330.     {"Julius Thruway",              {1377.30,2433.20,-89.00,1534.50,2507.20,110.90}},
  331.     {"Julius Thruway",              {1457.30,823.20,-89.00,2377.30,863.20,110.90}},
  332.     {"Julius Thruway",              {2377.30,788.80,-89.00,2537.30,897.90,110.90}},
  333.     {"Julius Thruway",              {1197.30,1163.30,-89.00,1236.60,2243.20,110.90}},
  334.     {"Julius Thruway",              {1236.60,2142.80,-89.00,1297.40,2243.20,110.90}},
  335.     {"Juniper Hill",                {-2533.00,578.30,-7.60,-2274.10,968.30,200.00}},
  336.     {"Juniper Hollow",              {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00}},
  337.     {"K.A.C.C.",                    {2498.20,2626.50,-89.00,2749.90,2861.50,110.90}},
  338.     {"Kincaid Bridge",              {-1339.80,599.20,-89.00,-1213.90,828.10,110.90}},
  339.     {"Kincaid Bridge",              {-1213.90,721.10,-89.00,-1087.90,950.00,110.90}},
  340.     {"Kincaid Bridge",              {-1087.90,855.30,-89.00,-961.90,986.20,110.90}},
  341.     {"King's",                      {-2329.30,458.40,-7.60,-1993.20,578.30,200.00}},
  342.     {"King's",                      {-2411.20,265.20,-9.10,-1993.20,373.50,200.00}},
  343.     {"King's",                      {-2253.50,373.50,-9.10,-1993.20,458.40,200.00}},
  344.     {"LVA Freight Depot",           {1457.30,863.20,-89.00,1777.40,1143.20,110.90}},
  345.     {"LVA Freight Depot",           {1375.60,919.40,-89.00,1457.30,1203.20,110.90}},
  346.     {"LVA Freight Depot",           {1277.00,1087.60,-89.00,1375.60,1203.20,110.90}},
  347.     {"LVA Freight Depot",           {1315.30,1044.60,-89.00,1375.60,1087.60,110.90}},
  348.     {"LVA Freight Depot",           {1236.60,1163.40,-89.00,1277.00,1203.20,110.90}},
  349.     {"Las Barrancas",               {-926.10,1398.70,-3.00,-719.20,1634.60,200.00}},
  350.     {"Las Brujas",                  {-365.10,2123.00,-3.00,-208.50,2217.60,200.00}},
  351.     {"Las Colinas",                 {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90}},
  352.     {"Las Colinas",                 {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90}},
  353.     {"Las Colinas",                 {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90}},
  354.     {"Las Colinas",                 {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90}},
  355.     {"Las Colinas",                 {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90}},
  356.     {"Las Colinas",                 {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90}},
  357.     {"Las Colinas",                 {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90}},
  358.     {"Las Payasadas",               {-354.30,2580.30,2.00,-133.60,2816.80,200.00}},
  359.     {"LV Airport",                  {1236.60,1203.20,-89.00,1457.30,1883.10,110.90}},
  360.     {"LV Airport",                  {1457.30,1203.20,-89.00,1777.30,1883.10,110.90}},
  361.     {"LV Airport",                  {1457.30,1143.20,-89.00,1777.40,1203.20,110.90}},
  362.     {"LV Airport",                  {1515.80,1586.40,-12.50,1729.90,1714.50,87.50}},
  363.     {"Last Dime Motel",             {1823.00,596.30,-89.00,1997.20,823.20,110.90}},
  364.     {"Leafy Hollow",                {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00}},
  365.     {"Liberty City",                {-1000.00,400.00,1300.00,-700.00,600.00,1400.00}},
  366.     {"Lil' Probe Inn",              {-90.20,1286.80,-3.00,153.80,1554.10,200.00}},
  367.     {"Linden Side",                 {2749.90,943.20,-89.00,2923.30,1198.90,110.90}},
  368.     {"Linden Station",              {2749.90,1198.90,-89.00,2923.30,1548.90,110.90}},
  369.     {"Linden Station",              {2811.20,1229.50,-39.50,2861.20,1407.50,60.40}},
  370.     {"Little Mexico",               {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90}},
  371.     {"Little Mexico",               {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
  372.     {"Los Flores",                  {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90}},
  373.     {"Los Flores",                  {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90}},
  374.     {"LS International",            {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90}},
  375.     {"LS International",            {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90}},
  376.     {"LS International",            {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90}},
  377.     {"LS International",            {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90}},
  378.     {"LS International",            {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90}},
  379.     {"LS International",            {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
  380.     {"Marina",                      {647.70,-1804.20,-89.00,851.40,-1577.50,110.90}},
  381.     {"Marina",                      {647.70,-1577.50,-89.00,807.90,-1416.20,110.90}},
  382.     {"Marina",                      {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
  383.     {"Market",                      {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
  384.     {"Market",                      {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90}},
  385.     {"Market",                      {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90}},
  386.     {"Market",                      {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90}},
  387.     {"Market Station",              {787.40,-1410.90,-34.10,866.00,-1310.20,65.80}},
  388.     {"Martin Bridge",               {-222.10,293.30,0.00,-122.10,476.40,200.00}},
  389.     {"Missionary Hill",             {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00}},
  390.     {"Montgomery",                  {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
  391.     {"Montgomery",                  {1451.40,347.40,-6.10,1582.40,420.80,200.00}},
  392.     {"Montgomery",                  {1546.60,208.10,0.00,1745.80,347.40,200.00}},
  393.     {"Montgomery",                  {1582.40,347.40,0.00,1664.60,401.70,200.00}},
  394.     {"Mulholland",                  {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
  395.     {"Mulholland",                  {1281.10,-452.40,-89.00,1641.10,-290.90,110.90}},
  396.     {"Mulholland",                  {1269.10,-768.00,-89.00,1414.00,-452.40,110.90}},
  397.     {"Mulholland",                  {1357.00,-926.90,-89.00,1463.90,-768.00,110.90}},
  398.     {"Mulholland",                  {1318.10,-910.10,-89.00,1357.00,-768.00,110.90}},
  399.     {"Mulholland",                  {1169.10,-910.10,-89.00,1318.10,-768.00,110.90}},
  400.     {"Mulholland",                  {768.60,-954.60,-89.00,952.60,-860.60,110.90}},
  401.     {"Mulholland",                  {687.80,-860.60,-89.00,911.80,-768.00,110.90}},
  402.     {"Mulholland",                  {737.50,-768.00,-89.00,1142.20,-674.80,110.90}},
  403.     {"Mulholland",                  {1096.40,-910.10,-89.00,1169.10,-768.00,110.90}},
  404.     {"Mulholland",                  {952.60,-937.10,-89.00,1096.40,-860.60,110.90}},
  405.     {"Mulholland",                  {911.80,-860.60,-89.00,1096.40,-768.00,110.90}},
  406.     {"Mulholland",                  {861.00,-674.80,-89.00,1156.50,-600.80,110.90}},
  407.     {"Mulholland",                  {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
  408.     {"North Rock",                  {2285.30,-768.00,0.00,2770.50,-269.70,200.00}},
  409.     {"Ocean Docks",                 {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90}},
  410.     {"Ocean Docks",                 {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90}},
  411.     {"Ocean Docks",                 {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90}},
  412.     {"Ocean Docks",                 {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90}},
  413.     {"Ocean Docks",                 {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90}},
  414.     {"Ocean Docks",                 {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90}},
  415.     {"Ocean Docks",                 {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
  416.     {"Ocean Flats",                 {-2994.40,277.40,-9.10,-2867.80,458.40,200.00}},
  417.     {"Ocean Flats",                 {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00}},
  418.     {"Ocean Flats",                 {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00}},
  419.     {"Octane Springs",              {338.60,1228.50,0.00,664.30,1655.00,200.00}},
  420.     {"Old Venturas Strip",          {2162.30,2012.10,-89.00,2685.10,2202.70,110.90}},
  421.     {"Palisades",                   {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00}},
  422.     {"Palomino Creek",              {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
  423.     {"Paradiso",                    {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00}},
  424.     {"Pershing Square",             {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
  425.     {"Pilgrim",                     {2437.30,1383.20,-89.00,2624.40,1783.20,110.90}},
  426.     {"Pilgrim",                     {2624.40,1383.20,-89.00,2685.10,1783.20,110.90}},
  427.     {"Pilson Intersection",         {1098.30,2243.20,-89.00,1377.30,2507.20,110.90}},
  428.     {"Pirates in Pants",            {1817.30,1469.20,-89.00,2027.40,1703.20,110.90}},
  429.     {"Playa del Seville",           {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90}},
  430.     {"Prickle Pine",                {1534.50,2583.20,-89.00,1848.40,2863.20,110.90}},
  431.     {"Prickle Pine",                {1117.40,2507.20,-89.00,1534.50,2723.20,110.90}},
  432.     {"Prickle Pine",                {1848.40,2553.40,-89.00,1938.80,2863.20,110.90}},
  433.     {"Prickle Pine",                {1938.80,2624.20,-89.00,2121.40,2861.50,110.90}},
  434.     {"Queens",                      {-2533.00,458.40,0.00,-2329.30,578.30,200.00}},
  435.     {"Queens",                      {-2593.40,54.70,0.00,-2411.20,458.40,200.00}},
  436.     {"Queens",                      {-2411.20,373.50,0.00,-2253.50,458.40,200.00}},
  437.     {"Randolph Industrial",         {1558.00,596.30,-89.00,1823.00,823.20,110.90}},
  438.     {"Redsands East",               {1817.30,2011.80,-89.00,2106.70,2202.70,110.90}},
  439.     {"Redsands East",               {1817.30,2202.70,-89.00,2011.90,2342.80,110.90}},
  440.     {"Redsands East",               {1848.40,2342.80,-89.00,2011.90,2478.40,110.90}},
  441.     {"Redsands West",               {1236.60,1883.10,-89.00,1777.30,2142.80,110.90}},
  442.     {"Redsands West",               {1297.40,2142.80,-89.00,1777.30,2243.20,110.90}},
  443.     {"Redsands West",               {1377.30,2243.20,-89.00,1704.50,2433.20,110.90}},
  444.     {"Redsands West",               {1704.50,2243.20,-89.00,1777.30,2342.80,110.90}},
  445.     {"Regular Tom",                 {-405.70,1712.80,-3.00,-276.70,1892.70,200.00}},
  446.     {"Richman",                     {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
  447.     {"Richman",                     {647.50,-954.60,-89.00,768.60,-860.60,110.90}},
  448.     {"Richman",                     {225.10,-1369.60,-89.00,334.50,-1292.00,110.90}},
  449.     {"Richman",                     {225.10,-1292.00,-89.00,466.20,-1235.00,110.90}},
  450.     {"Richman",                     {72.60,-1404.90,-89.00,225.10,-1235.00,110.90}},
  451.     {"Richman",                     {72.60,-1235.00,-89.00,321.30,-1008.10,110.90}},
  452.     {"Richman",                     {321.30,-1235.00,-89.00,647.50,-1044.00,110.90}},
  453.     {"Richman",                     {321.30,-1044.00,-89.00,647.50,-860.60,110.90}},
  454.     {"Richman",                     {321.30,-860.60,-89.00,687.80,-768.00,110.90}},
  455.     {"Richman",                     {321.30,-768.00,-89.00,700.70,-674.80,110.90}},
  456.     {"Robada Intersection",         {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90}},
  457.     {"Roca Escalante",              {2237.40,2202.70,-89.00,2536.40,2542.50,110.90}},
  458.     {"Roca Escalante",              {2536.40,2202.70,-89.00,2625.10,2442.50,110.90}},
  459.     {"Rockshore East",              {2537.30,676.50,-89.00,2902.30,943.20,110.90}},
  460.     {"Rockshore West",              {1997.20,596.30,-89.00,2377.30,823.20,110.90}},
  461.     {"Rockshore West",              {2377.30,596.30,-89.00,2537.30,788.80,110.90}},
  462.     {"Rodeo",                       {72.60,-1684.60,-89.00,225.10,-1544.10,110.90}},
  463.     {"Rodeo",                       {72.60,-1544.10,-89.00,225.10,-1404.90,110.90}},
  464.     {"Rodeo",                       {225.10,-1684.60,-89.00,312.80,-1501.90,110.90}},
  465.     {"Rodeo",                       {225.10,-1501.90,-89.00,334.50,-1369.60,110.90}},
  466.     {"Rodeo",                       {334.50,-1501.90,-89.00,422.60,-1406.00,110.90}},
  467.     {"Rodeo",                       {312.80,-1684.60,-89.00,422.60,-1501.90,110.90}},
  468.     {"Rodeo",                       {422.60,-1684.60,-89.00,558.00,-1570.20,110.90}},
  469.     {"Rodeo",                       {558.00,-1684.60,-89.00,647.50,-1384.90,110.90}},
  470.     {"Rodeo",                       {466.20,-1570.20,-89.00,558.00,-1385.00,110.90}},
  471.     {"Rodeo",                       {422.60,-1570.20,-89.00,466.20,-1406.00,110.90}},
  472.     {"Rodeo",                       {466.20,-1385.00,-89.00,647.50,-1235.00,110.90}},
  473.     {"Rodeo",                       {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
  474.     {"Royal Casino",                {2087.30,1383.20,-89.00,2437.30,1543.20,110.90}},
  475.     {"San Andreas Sound",           {2450.30,385.50,-100.00,2759.20,562.30,200.00}},
  476.     {"Santa Flora",                 {-2741.00,458.40,-7.60,-2533.00,793.40,200.00}},
  477.     {"Santa Maria Beach",           {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
  478.     {"Santa Maria Beach",           {72.60,-2173.20,-89.00,342.60,-1684.60,110.90}},
  479.     {"Shady Cabin",                 {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00}},
  480.     {"Shady Creeks",                {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00}},
  481.     {"Shady Creeks",                {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00}},
  482.     {"Sobell Rail Yards",           {2749.90,1548.90,-89.00,2923.30,1937.20,110.90}},
  483.     {"Spinybed",                    {2121.40,2663.10,-89.00,2498.20,2861.50,110.90}},
  484.     {"Starfish Casino",             {2437.30,1783.20,-89.00,2685.10,2012.10,110.90}},
  485.     {"Starfish Casino",             {2437.30,1858.10,-39.00,2495.00,1970.80,60.90}},
  486.     {"Starfish Casino",             {2162.30,1883.20,-89.00,2437.30,2012.10,110.90}},
  487.     {"Temple",                      {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
  488.     {"Temple",                      {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90}},
  489.     {"Temple",                      {1252.30,-926.90,-89.00,1357.00,-910.10,110.90}},
  490.     {"Temple",                      {952.60,-1130.80,-89.00,1096.40,-937.10,110.90}},
  491.     {"Temple",                      {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90}},
  492.     {"Temple",                      {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90}},
  493.     {"The Camel's Toe",             {2087.30,1203.20,-89.00,2640.40,1383.20,110.90}},
  494.     {"The Clown's Pocket",          {2162.30,1783.20,-89.00,2437.30,1883.20,110.90}},
  495.     {"The Emerald Isle",            {2011.90,2202.70,-89.00,2237.40,2508.20,110.90}},
  496.     {"The Farm",                    {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90}},
  497.     {"4 Dragons Casino",            {1817.30,863.20,-89.00,2027.30,1083.20,110.90}},
  498.     {"The High Roller",             {1817.30,1283.20,-89.00,2027.30,1469.20,110.90}},
  499.     {"The Mako Span",               {1664.60,401.70,0.00,1785.10,567.20,200.00}},
  500.     {"The Panopticon",              {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
  501.     {"The Pink Swan",               {1817.30,1083.20,-89.00,2027.30,1283.20,110.90}},
  502.     {"The Sherman Dam",             {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
  503.     {"The Strip",                   {2027.40,863.20,-89.00,2087.30,1703.20,110.90}},
  504.     {"The Strip",                   {2106.70,1863.20,-89.00,2162.30,2202.70,110.90}},
  505.     {"The Strip",                   {2027.40,1783.20,-89.00,2162.30,1863.20,110.90}},
  506.     {"The Strip",                   {2027.40,1703.20,-89.00,2137.40,1783.20,110.90}},
  507.     {"The Visage",                  {1817.30,1863.20,-89.00,2106.70,2011.80,110.90}},
  508.     {"The Visage",                  {1817.30,1703.20,-89.00,2027.40,1863.20,110.90}},
  509.     {"Unity Station",               {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
  510.     {"Valle Ocultado",              {-936.60,2611.40,2.00,-715.90,2847.90,200.00}},
  511.     {"Verdant Bluffs",              {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90}},
  512.     {"Verdant Bluffs",              {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90}},
  513.     {"Verdant Bluffs",              {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
  514.     {"Verdant Meadows",             {37.00,2337.10,-3.00,435.90,2677.90,200.00}},
  515.     {"Verona Beach",                {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
  516.     {"Verona Beach",                {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90}},
  517.     {"Verona Beach",                {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90}},
  518.     {"Verona Beach",                {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90}},
  519.     {"Verona Beach",                {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90}},
  520.     {"Vinewood",                    {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
  521.     {"Vinewood",                    {787.40,-1130.80,-89.00,952.60,-954.60,110.90}},
  522.     {"Vinewood",                    {647.50,-1227.20,-89.00,787.40,-1118.20,110.90}},
  523.     {"Vinewood",                    {647.70,-1416.20,-89.00,787.40,-1227.20,110.90}},
  524.     {"Whitewood Estates",           {883.30,1726.20,-89.00,1098.30,2507.20,110.90}},
  525.     {"Whitewood Estates",           {1098.30,1726.20,-89.00,1197.30,2243.20,110.90}},
  526.     {"Willowfield",                 {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90}},
  527.     {"Willowfield",                 {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90}},
  528.     {"Willowfield",                 {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90}},
  529.     {"Willowfield",                 {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90}},
  530.     {"Willowfield",                 {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90}},
  531.     {"Willowfield",                 {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90}},
  532.     {"Willowfield",                 {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}},
  533.     {"Yellow Bell Station",         {1377.40,2600.40,-21.90,1492.40,2687.30,78.00}},
  534.     // Citys Zones
  535.     {"Los Santos",                  {44.60,-2892.90,-242.90,2997.00,-768.00,900.00}},
  536.     {"Las Venturas",                {869.40,596.30,-242.90,2997.00,2993.80,900.00}},
  537.     {"Bone County",                 {-480.50,596.30,-242.90,869.40,2993.80,900.00}},
  538.     {"Tierra Robada",               {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00}},
  539.     {"Tierra Robada",               {-1213.90,596.30,-242.90,-480.50,1659.60,900.00}},
  540.     {"San Fierro",                  {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00}},
  541.     {"Red County",                  {-1213.90,-768.00,-242.90,2997.00,596.30,900.00}},
  542.     {"Flint County",                {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00}},
  543.     {"Whetstone",                   {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
  544. };
  545. new SideL, SideR;
  546. new Text:Tacho[MAX_PLAYERS];
  547. enum player_info { Own, Rent }
  548. new Player[MAX_PLAYERS][player_info];
  549. public OnFilterScriptInit()
  550. {
  551.     print("\n--------------------------------------");
  552.     print("ETB Cars by EvilToastBrot©");
  553.     print("--------------------------------------\n");
  554.     new str[150];
  555.     for(new i = 0; i<sizeof(ShowCars); i++)
  556.     {
  557.         format(str, sizeof str,"Fahrzeug: %s\nPreis: %d$",ShowCars[i][CarName],ShowCars[i][CarPreis]);
  558.         ShowCars[i][lbl] = Create3DTextLabel(str, COLOR_NS, 0.0, 0.0, 0.0, 40.0, 0, 0);
  559.         ShowCars[i][v_id] = CreateVehicle(ShowCars[i][mmodel],ShowCars[i][Carx],ShowCars[i][Cary],ShowCars[i][Carz],ShowCars[i][Cara],ShowCars[i][Color1],ShowCars[i][Color2], 300);
  560.         Attach3DTextLabelToVehicle(ShowCars[i][lbl], ShowCars[i][v_id], 0.0, 0.0, 1.25);
  561.     }
  562.     for(new i = 0; i<MAX_ID; i++)
  563.     {
  564.         LoadCar(i);
  565.         AddComponents(i);
  566.     }
  567.     SetTimer("Save", 5000, 1);
  568.     SetTimer("Gas", 20000, 1);
  569.     SetTimer("CheckLock", 1000, 1);
  570.     if(!fexist("/Cars/Players.ini"))
  571.     {
  572.         new File:f;
  573.         f = fopen("/Cars/Players.ini", io_write);
  574.         if(f) fclose(f);
  575.     }
  576.     return 1;
  577. }
  578.  
  579. public OnFilterScriptExit()
  580. {
  581.     for(new i = 0; i < MAX_PLAYERS; i++)
  582.     {
  583.         SaveCar(i);
  584.     }
  585.     return 1;
  586. }
  587.  
  588. main() { }
  589.  
  590. public OnPlayerConnect(playerid)
  591. {
  592.     Tacho[playerid] = TextDrawCreate(460.000000, 381.500000, " ");
  593.     TextDrawBackgroundColor(Tacho[playerid], 255);
  594.     TextDrawFont(Tacho[playerid], 1);
  595.     TextDrawLetterSize(Tacho[playerid], 0.32, 0.97);
  596.     TextDrawColor(Tacho[playerid], -1);
  597.     TextDrawSetOutline(Tacho[playerid], 0);
  598.     TextDrawSetProportional(Tacho[playerid], 1);
  599.     TextDrawSetShadow(Tacho[playerid], 1);
  600.     SetPlayerMapIcon(playerid, 0, 547.0040, -1280.7773, 17.2482, 55, 0);
  601.     SetPlayerMapIcon(playerid, 1, 2127.0771, -1134.5930, 25.5472, 55, 0);
  602.     SetPlayerMapIcon(playerid, 2, -1657.1593, 1213.0844, 21.1563, 55, 0);
  603.     CheckLock();
  604.     if(INI_Open("/Cars/Players.ini"))
  605.     {
  606.         new str[60];
  607.         format(str, sizeof str, "%s: Owner ", pn(playerid));
  608.         Player[playerid][Own] = INI_ReadInt(str);
  609.         format(str, sizeof str, "%s: Renter ", pn(playerid));
  610.         Player[playerid][Rent] = INI_ReadInt(str);
  611.         INI_Close();
  612.     }
  613.     return 1;
  614. }
  615.  
  616. public OnPlayerDisconnect(playerid, reason)
  617. {
  618.     TextDrawHideForPlayer(playerid, Tacho[playerid]);
  619.     if(INI_Open("/Cars/Players.ini"))
  620.     {
  621.         new str[60];
  622.         format(str, sizeof str, "%s: Owner ", pn(playerid));
  623.         INI_WriteInt(str, Player[playerid][Own]);
  624.         format(str, sizeof str, "%s: Rent ", pn(playerid));
  625.         INI_WriteInt(str, Player[playerid][Rent]);
  626.         INI_Save();
  627.         INI_Close();
  628.     }
  629.     return 1;
  630. }
  631.  
  632. public OnVehicleSpawn(vehicleid)
  633. {
  634.     return 1;
  635. }
  636.  
  637. public OnVehicleDeath(vehicleid, killerid)
  638. {
  639.     SetTimerEx("Respawn", 3000, 0, "d", vehicleid);
  640.     return 1;
  641. }
  642.  
  643. public OnPlayerCommandText(playerid, cmdtext[])
  644. {
  645.     new idx, cmd[20], tmp[256], str[256];
  646.     cmd = strtok(cmdtext, idx);
  647.     if(!strcmp("/carhelp", cmdtext, true))
  648.     {
  649.         SendClientMessage(playerid, COLOR_YELLOW, "/SellCar --> Fahrzeug verkaufen");
  650.         SendClientMessage(playerid, COLOR_YELLOW, "/Park --> Fahrzeug parken");
  651.         SendClientMessage(playerid, COLOR_YELLOW, "/Back --> Fahrzeug an den Parkplatz teleportieren");
  652.         SendClientMessage(playerid, COLOR_YELLOW, "/LC [CarID] --> Fahrzeug abschließen");
  653.         SendClientMessage(playerid, COLOR_YELLOW, "/ULC [CarID] --> Fahrzeug aufschließen");
  654.         SendClientMessage(playerid, COLOR_YELLOW, "/Lock --> Fahrzeug ab-/aufschließen ( Nur wenn man im Fahrzeug sitzt! )");
  655.         SendClientMessage(playerid, COLOR_YELLOW, "/Fill --> Fahrzeug an der Tanke auftanken");
  656.         SendClientMessage(playerid, COLOR_YELLOW, "/Cars --> Eigene Fahrzeuge einsehen");
  657.         SendClientMessage(playerid, COLOR_YELLOW, "/GiveCarKey [PlayerID] [CarID] --> Jemanden einen Fahrzeugschlüssel leihen");
  658.         if(IsPlayerAdmin(playerid))
  659.         {
  660.             SendClientMessage(playerid, COLOR_RED, "/GotoCar [CarID] --> Zu einem Fahrzeug teleportieren");
  661.             SendClientMessage(playerid, COLOR_RED, "/EnterCar [CarID] --> In ein Fahrzeug hineinteleportieren");
  662.             SendClientMessage(playerid, COLOR_RED, "/BackCar [CarID] --> Ein Fahrzeug zum Parkplatz hinteleportieren");
  663.         }
  664.         return 1;
  665.     }
  666.     if (strcmp("/sellcar", cmdtext, true) == 0)
  667.     {
  668.         if(IsPlayerInAnyVehicle(playerid))
  669.         {
  670.             for(new i = 0; i<MAX_VEHICLES; i++)
  671.             {
  672.                 if(PlayerCar[i][vid] == GetPlayerVehicleID(playerid))
  673.                 {
  674.                     if(!strcmp(PlayerCar[i][Key], pn(playerid), false))
  675.                     {
  676.                         new sform[128];
  677.                         format(sform,sizeof sform,"/Cars/%d.ini",PlayerCar[i][NSID]);
  678.                         if(fexist(sform))
  679.                         {
  680.                             print("File existiert");
  681.                             GivePlayerMoney(playerid, PlayerCar[i][BuyPrice]/2);
  682.                             new pm = GetVehicleModel(PlayerCar[i][vid]);
  683.                             pm -= 400;
  684.                             format(str, sizeof str, "Du hast deinen %s für %d verkauft!", PlayerVehicle[pm], PlayerCar[i][BuyPrice]/2);
  685.                             SendClientMessage(playerid, COLOR_RED, str);
  686.                             DestroyVehicle(PlayerCar[i][vid]);
  687.                             if(INI_Open(sform))
  688.                             {
  689.                                 INI_Remove(sform);
  690.                                 INI_Save();
  691.                                 INI_Close();
  692.                             }
  693.                             PlayerCar[i][BuyPrice] = 0;
  694.                             PlayerCar[i][px] = 0;
  695.                             PlayerCar[i][py] = 0;
  696.                             PlayerCar[i][pz] = 0;
  697.                             PlayerCar[i][pa] = 0;
  698.                             format(PlayerCar[i][Key], MAX_PLAYER_NAME, "");
  699.                             PlayerCar[i][model] = 0;
  700.                             PlayerCar[i][c1] = 0;
  701.                             PlayerCar[i][c2] = 0;
  702.                             Player[playerid][Own]--;
  703.                             format(PlayerCar[i][ABC], 11, "");
  704.                             return 1;
  705.                         }
  706.                         else
  707.                         {
  708.                             return 1;
  709.                         }
  710.                     }
  711.                     else
  712.                     {
  713.                         return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  714.                     }
  715.                 }
  716.             }
  717.         }
  718.         return 1;
  719.     }
  720.     if (strcmp("/park", cmdtext, true) == 0)
  721.     {
  722.         if(IsPlayerInAnyVehicle(playerid))
  723.         {
  724.             for(new i = 0; i<MAX_VEHICLES; i++)
  725.             {
  726.                 if(PlayerCar[i][vid] == GetPlayerVehicleID(playerid))
  727.                 {
  728.                     if(!strcmp(PlayerCar[i][Key], pn(playerid), false))
  729.                     {
  730.                         GetVehiclePos(GetPlayerVehicleID(playerid), PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz]);
  731.                         GetVehicleZAngle(GetPlayerVehicleID(playerid), PlayerCar[i][pa]);
  732.                         new Float:hh;
  733.                         GetVehicleHealth(GetPlayerVehicleID(playerid), hh);
  734.                         DestroyVehicle(PlayerCar[i][vid]);
  735.                         PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1);
  736.                         SetVehicleHealth(PlayerCar[i][vid], hh);
  737.                         AddComponents(i);
  738.                     }
  739.                     else
  740.                     {
  741.                         SendClientMessage(playerid, COLOR_GREY, "Das Fahrzeug gehört dir nicht!");
  742.                     }
  743.                     return 1;
  744.                 }
  745.             }
  746.         }
  747.         return 1;
  748.     }
  749.     if (strcmp("/back", cmdtext, true) == 0)
  750.     {
  751.         if(IsPlayerConnected(playerid))
  752.         {
  753.             for(new i = 0; i<MAX_VEHICLES; i++)
  754.             {
  755.                 if(PlayerCar[i][vid] == GetPlayerVehicleID(playerid))
  756.                 {
  757.                     if(!strcmp(PlayerCar[i][Key], pn(playerid), false) || !strcmp(pn(playerid), PlayerCar[i][Key2], false))
  758.                     {
  759.                         new Float:hh;
  760.                         GetVehicleHealth(GetPlayerVehicleID(playerid), hh);
  761.                         SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  762.                         SetVehicleHealth(PlayerCar[i][vid], hh);
  763.                         AddComponents(i);
  764.                     }
  765.                     else
  766.                     {
  767.                         return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  768.                     }
  769.                     return 1;
  770.                 }
  771.             }
  772.         }
  773.         return 1;
  774.     }
  775.     if(!strcmp("/givecarkey", cmd, true))
  776.     {
  777.         tmp = strtok(cmdtext, idx);
  778.         if(!strlen(tmp))
  779.         {
  780.             return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /GiveCarKey [PlayerID/Name] [CarID]");
  781.         }
  782.         new pid = ReturnUser(tmp);
  783.         if(!IsPlayerConnected(pid))
  784.         {
  785.             return SendClientMessage(playerid, COLOR_GREY, "Inaktiver Spieler!");
  786.         }
  787.         tmp = strtok(cmdtext, idx);
  788.         if(!strlen(tmp))
  789.         {
  790.             return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /GiveCarKey [PlayerID/Name] [CarID]");
  791.         }
  792.         new id = strval(tmp);
  793.         new sform[128];
  794.         format(sform, sizeof sform, "/Cars/%d.ini", id);
  795.         for(new i = 0; i<MAX_VEHICLES; i++)
  796.         {
  797.             if(id == PlayerCar[i][NSID])
  798.             {
  799.                 if(fexist(sform))
  800.                 {
  801.                     if(!strcmp(pn(playerid), PlayerCar[i][Key], false))
  802.                     {
  803.                         if(Player[pid][Rent] < MaxCarsRent)
  804.                         {
  805.                             format(PlayerCar[i][Key2], MAX_PLAYER_NAME, "%s", pn(pid));
  806.                             Player[pid][Rent]++;
  807.                             format(str, sizeof str, "Du hast %s den Schlüssel zu deinem %s ( ID: %d ) gegeben!", pn(pid), PlayerVehicle[GetVehicleModel(PlayerCar[i][vid])-400], PlayerCar[i][NSID]);
  808.                             SendClientMessage(playerid, COLOR_YELLOW, str);
  809.                             format(str, sizeof str, "%s hat dir den Schlüssel zu seinem %s ( ID: %d ) gegeben!", pn(playerid), PlayerVehicle[GetVehicleModel(PlayerCar[i][vid])-400], PlayerCar[i][NSID]);
  810.                             SendClientMessage(playerid, COLOR_YELLOW, str);
  811.                             PlayerCar[i][Rented] = 1;
  812.                             return 1;
  813.                         }
  814.                         else
  815.                         {
  816.                             new string[50];
  817.                             format(string, sizeof string, "Der Spieler hat bereits %s Cars geliehen!", MaxCarsRent);
  818.                             SendClientMessage(playerid, COLOR_GREY, string);
  819.                             return 1;
  820.                         }
  821.                     }
  822.                     else
  823.                     {
  824.                         return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  825.                     }
  826.                 }
  827.             }
  828.         }
  829.         return 1;
  830.     }
  831.     if(!strcmp("/trashkey", cmd, true))
  832.     {
  833.         tmp = strtok(cmdtext, idx);
  834.         if(!strlen(tmp))
  835.         {
  836.             return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /TrashKey [CarID]");
  837.         }
  838.         new id = strval(tmp);
  839.         new sform[128];
  840.         format(sform, sizeof sform, "/Cars/%d.ini", id);
  841.         for(new i = 0; i<MAX_VEHICLES; i++)
  842.         {
  843.             if(id == PlayerCar[i][NSID])
  844.             {
  845.                 if(fexist(sform))
  846.                 {
  847.                     if(PlayerCar[i][Rented])
  848.                     {
  849.                         if(!strcmp(pn(playerid), PlayerCar[i][Key2], false))
  850.                         {
  851.                             format(PlayerCar[i][Key2], MAX_PLAYER_NAME, "");
  852.                             Player[playerid][Rent]--;
  853.                             new string[128];
  854.                             PlayerCar[i][Rented] = 0;
  855.                             format(string, sizeof string, "Du hast den Schlüssel zu deinem %s ( ID: %d ) weggeworfen!", PlayerVehicle[GetVehicleModel(PlayerCar[i][vid])-400], PlayerCar[i][NSID]);
  856.                             SendClientMessage(playerid, COLOR_GREY, string);
  857.                             return 1;
  858.                         }
  859.                         else
  860.                         {
  861.                             return SendClientMessage(playerid, COLOR_GREY, "Du hast nicht den Schlüssel zu diesem Fahrzeug!");
  862.                         }
  863.                     }
  864.                     else
  865.                     {
  866.                         return SendClientMessage(playerid, COLOR_GREY, "Du hast keine Schlüssel ausgeliehen!");
  867.                     }
  868.                 }
  869.             }
  870.         }
  871.         return 1;
  872.     }
  873.     if(!strcmp("/lc", cmd, true))
  874.     {
  875.         tmp = strtok(cmdtext, idx);
  876.         new id = strval(tmp);
  877.         new sform[128];
  878.         format(sform,sizeof sform,"/Cars/%d.ini",id);
  879.         if(!strlen(tmp))
  880.         {
  881.             return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /LC [CarID]");
  882.         }
  883.         for(new i = 0; i<MAX_VEHICLES; i++)
  884.         {
  885.             if(id == PlayerCar[i][NSID])
  886.             {
  887.                 if(fexist(sform))
  888.                 {
  889.                     if(!strcmp(pn(playerid), PlayerCar[i][Key], false))
  890.                     {
  891.                         PlayerCar[i][Lock] = 1;
  892.                         SetVehicleParams4All(PlayerCar[i][vid], 0, 1);
  893.                         SetVehicleParamsForPlayer(PlayerCar[i][vid], playerid, 0, 0);
  894.                         if(IsPlayerConnected(ReturnUser(PlayerCar[i][Key2]))) { SetVehicleParamsForPlayer(PlayerCar[i][vid], ReturnUser(PlayerCar[i][Key2]), 0, 0); }
  895.                         SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug abgeschlossen! ::.");
  896.                         return 1;
  897.                     }
  898.                     else if(strcmp(pn(playerid), PlayerCar[i][Key], false) != 0)
  899.                     {
  900.                         return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  901.                     }
  902.                     if(PlayerCar[i][Rented])
  903.                     {
  904.                         if(!strcmp(pn(playerid), PlayerCar[i][Key2], false))
  905.                         {
  906.                             PlayerCar[i][Lock] = 1;
  907.                             SetVehicleParams4All(PlayerCar[i][vid], 0, 1);
  908.                             SetVehicleParamsForPlayer(PlayerCar[i][vid], playerid, 0, 0);
  909.                             if(IsPlayerConnected(ReturnUser(PlayerCar[i][Key2]))) { SetVehicleParamsForPlayer(PlayerCar[i][vid], ReturnUser(PlayerCar[i][Key2]), 0, 0); }
  910.                             SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug abgeschlossen! ::.");
  911.                             return 1;
  912.                         }
  913.                         else
  914.                         {
  915.                             return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  916.                         }
  917.                     }
  918.                 }
  919.             }
  920.         }
  921.         return 1;
  922.     }
  923.     if(!strcmp("/ulc", cmd, true))
  924.     {
  925.         tmp = strtok(cmdtext, idx);
  926.         new id = strval(tmp);
  927.         new sform[128];
  928.         format(sform,sizeof sform,"/Cars/%d.ini",id);
  929.         if(!strlen(tmp))
  930.         {
  931.             return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /LC [CarID]");
  932.         }
  933.         for(new i = 0; i<MAX_VEHICLES; i++)
  934.         {
  935.             if(id == PlayerCar[i][NSID])
  936.             {
  937.                 if(fexist(sform))
  938.                 {
  939.                     if(!strcmp(pn(playerid), PlayerCar[i][Key], false))
  940.                     {
  941.                         PlayerCar[i][Lock] = 0;
  942.                         SetVehicleParams4All(PlayerCar[i][vid], 0, 0);
  943.                         SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug aufgeschlossen! ::.");
  944.                         return 1;
  945.                     }
  946.                     else if(strcmp(pn(playerid), PlayerCar[i][Key], false) != 0)
  947.                     {
  948.                         return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  949.                     }
  950.                     if(PlayerCar[i][Rented])
  951.                     {
  952.                         if(!strcmp(pn(playerid), PlayerCar[i][Key2], false))
  953.                         {
  954.                             PlayerCar[i][Lock] = 0;
  955.                             SetVehicleParams4All(PlayerCar[i][vid], 0, 0);
  956.                             SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug aufgeschlossen! ::.");
  957.                             return 1;
  958.                         }
  959.                         else
  960.                         {
  961.                             return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  962.                         }
  963.                     }
  964.                 }
  965.             }
  966.         }
  967.         return 1;
  968.     }
  969.     if(!strcmp("/backcar", cmd, true))
  970.     {
  971.         if(IsPlayerAdmin(playerid))
  972.         {
  973.             tmp = strtok(cmdtext, idx);
  974.             if(!strlen(tmp))
  975.             {
  976.                 return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /BackCar [CarID]");
  977.             }
  978.             new id = strval(tmp);
  979.             for(new i = 0; i<MAX_VEHICLES; i++)
  980.             {
  981.                 if(id == PlayerCar[i][NSID])
  982.                 {
  983.                     SetVehicleToRespawn(PlayerCar[i][vid]);
  984.                     SendClientMessage(playerid, COLOR_GREY, "Fahrzeug gebackt!");
  985.                     return 1;
  986.                 }
  987.             }
  988.         }
  989.         else
  990.         {
  991.             return SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin!");
  992.         }
  993.         return 1;
  994.     }
  995.     if(!strcmp("/gotocar", cmd, true))
  996.     {
  997.         if(IsPlayerAdmin(playerid))
  998.         {
  999.             tmp = strtok(cmdtext, idx);
  1000.             if(!strlen(tmp))
  1001.             {
  1002.                 return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /GotoCar [CarID]");
  1003.             }
  1004.             new id = strval(tmp), Float:x, Float:y, Float:z;
  1005.             for(new i = 0; i<MAX_VEHICLES; i++)
  1006.             {
  1007.                 if(id == PlayerCar[i][NSID])
  1008.                 {
  1009.                     GetVehiclePos(PlayerCar[i][vid], x, y, z);
  1010.                     SetPlayerPos(playerid, x, y, z+1);
  1011.                     SendClientMessage(playerid, COLOR_GREY, "Du hast dich teleportiert!");
  1012.                     return 1;
  1013.                 }
  1014.             }
  1015.         }
  1016.         else
  1017.         {
  1018.             return SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin!");
  1019.         }
  1020.         return 1;
  1021.     }
  1022.     if(!strcmp("/entercar", cmd, true))
  1023.     {
  1024.         if(IsPlayerAdmin(playerid))
  1025.         {
  1026.             tmp = strtok(cmdtext, idx);
  1027.             if(!strlen(tmp))
  1028.             {
  1029.                 return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /GotoCar [CarID]");
  1030.             }
  1031.             new id = strval(tmp);
  1032.             for(new i = 0; i<MAX_VEHICLES; i++)
  1033.             {
  1034.                 if(id == PlayerCar[i][NSID])
  1035.                 {
  1036.                     PutPlayerInVehicle(playerid, PlayerCar[i][vid], 0);
  1037.                     SendClientMessage(playerid, COLOR_GREY, "Du hast dich teleportiert!");
  1038.                     return 1;
  1039.                 }
  1040.             }
  1041.         }
  1042.         else
  1043.         {
  1044.             return SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin!");
  1045.         }
  1046.         return 1;
  1047.     }
  1048.     if(!strcmp("/getcar", cmd, true))
  1049.     {
  1050.         if(IsPlayerAdmin(playerid))
  1051.         {
  1052.             tmp = strtok(cmdtext, idx);
  1053.             if(!strlen(tmp))
  1054.             {
  1055.                 return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /GetCar [CarID]");
  1056.             }
  1057.             new id = strval(tmp);
  1058.             for(new i = 0; i<MAX_VEHICLES; i++)
  1059.             {
  1060.                 if(id == PlayerCar[i][NSID])
  1061.                 {
  1062.                     new Float:xx, Float:yy, Float:zz;
  1063.                     GetPlayerPos(playerid, xx, yy, zz);
  1064.                     SetVehiclePos(PlayerCar[i][vid], xx+1, yy+1, zz);
  1065.                     return 1;
  1066.                 }
  1067.             }
  1068.         }
  1069.         else
  1070.         {
  1071.             return SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin!");
  1072.         }
  1073.         return 1;
  1074.     }
  1075.     if(!strcmp("/lock", cmdtext, true))
  1076.     {
  1077.         if(IsPlayerInAnyVehicle(playerid))
  1078.         {
  1079.             for(new i = 0; i<MAX_VEHICLES; i++)
  1080.             {
  1081.                 if(PlayerCar[i][vid] == GetPlayerVehicleID(playerid))
  1082.                 {
  1083.                     if(!strcmp(PlayerCar[i][Key], pn(playerid), false))
  1084.                     {
  1085.                         if(!PlayerCar[i][Lock])
  1086.                         {
  1087.                             PlayerCar[i][Lock] = 1;
  1088.                             SetVehicleParams4All(PlayerCar[i][vid], 0, 1);
  1089.                             SetVehicleParamsForPlayer(PlayerCar[i][vid], playerid, 0, 0);
  1090.                             if(IsPlayerConnected(ReturnUser(PlayerCar[i][Key2]))) { SetVehicleParamsForPlayer(PlayerCar[i][vid], ReturnUser(PlayerCar[i][Key2]), 0, 0); }
  1091.                             SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug aufgeschlossen! ::.");
  1092.                             return 1;
  1093.                         }
  1094.                         else if(PlayerCar[i][Lock])
  1095.                         {
  1096.                             PlayerCar[i][Lock] = 0;
  1097.                             SetVehicleParams4All(PlayerCar[i][vid], 0, 0);
  1098.                             SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug abgeschlossen! ::.");
  1099.                             return 1;
  1100.                         }
  1101.                     }
  1102.                     else
  1103.                     {
  1104.                         return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  1105.                     }
  1106.                     if(PlayerCar[i][Rented])
  1107.                     {
  1108.                         if(!strcmp(pn(playerid), PlayerCar[i][Key2], false))
  1109.                         {
  1110.                             if(!PlayerCar[i][Lock])
  1111.                             {
  1112.                                 PlayerCar[i][Lock] = 1;
  1113.                                 SetVehicleParams4All(PlayerCar[i][vid], 0, 1);
  1114.                                 SetVehicleParamsForPlayer(PlayerCar[i][vid], playerid, 0, 0);
  1115.                                 if(IsPlayerConnected(ReturnUser(PlayerCar[i][Key2]))) { SetVehicleParamsForPlayer(PlayerCar[i][vid], ReturnUser(PlayerCar[i][Key2]), 0, 0); }
  1116.                                 SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug aufgeschlossen! ::.");
  1117.                                 return 1;
  1118.                             }
  1119.                             else if(PlayerCar[i][Lock])
  1120.                             {
  1121.                                 PlayerCar[i][Lock] = 0;
  1122.                                 SetVehicleParams4All(PlayerCar[i][vid], 0, 0);
  1123.                                 SendClientMessage(playerid, COLOR_GREEN, ".:: Fahrzeug abgeschlossen! ::.");
  1124.                                 return 1;
  1125.                             }
  1126.                         }
  1127.                         else
  1128.                         {
  1129.                             return SendClientMessage(playerid, COLOR_GREY, "Dieses Fahrzeug gehört dir nicht!");
  1130.                         }
  1131.                     }
  1132.                 }
  1133.             }
  1134.         }
  1135.         return 1;
  1136.     }
  1137.     if(!strcmp("/fill", cmdtext, true))
  1138.     {
  1139.         if(IsPlayerInAnyVehicle(playerid))
  1140.         {
  1141.             if(IsAtGasStation(playerid))
  1142.             {
  1143.                 for(new i = 0; i<MAX_VEHICLES; i++)
  1144.                 {
  1145.                     if(GetPlayerVehicleID(playerid) == PlayerCar[i][vid])
  1146.                     {
  1147.                         new price = 100; price -= PlayerCar[i][Fuel];
  1148.                         if(GetPlayerMoney(playerid) > price*2)
  1149.                         {
  1150.                             TogglePlayerControllable(playerid, 0);
  1151.                             new OldFuel = PlayerCar[i][Fuel], t = vrandom(2000, 5000);
  1152.                             SetTimerEx("FillGas", t, 0, "iii", OldFuel, i, playerid);
  1153.                             GameTextForPlayer(playerid, "~w~~n~~n~~n~~n~~n~~n~~n~~n~Fahrzeug wird betankt...",t,3);
  1154.                         }
  1155.                         else
  1156.                         {
  1157.                             return SendClientMessage(playerid, COLOR_GREY, "Du hast nicht genug Geld!");
  1158.                         }
  1159.                     }
  1160.                 }
  1161.             }
  1162.             else
  1163.             {
  1164.                 return SendClientMessage(playerid, COLOR_GREY, "Du bist an keiner Tanke!");
  1165.             }
  1166.         }
  1167.         return 1;
  1168.     }
  1169.     if(!strcmp("/cars", cmdtext, true))
  1170.     {
  1171.         new sform[128], counter = 1, strii[128];
  1172.         for(new i = 0; i<MAX_VEHICLES; i++)
  1173.         {
  1174.             format(sform,sizeof sform,"/Cars/%d.ini",PlayerCar[i][NSID]);
  1175.             if(fexist(sform))
  1176.             {
  1177.                 if(!strcmp(PlayerCar[i][Key], pn(playerid), false))
  1178.                 {
  1179.                     format(strii, sizeof strii, "Car %d - %s: %s-%s-%d", counter, PlayerVehicle[GetVehicleModel(PlayerCar[i][vid])-400], NSPraefix, PlayerCar[i][ABC], PlayerCar[i][NSID]);
  1180.                     SendClientMessage(playerid, COLOR_YELLOW, strii);
  1181.                     counter++;
  1182.                 }
  1183.                 if(strlen(PlayerCar[i][Key2]) > 0)
  1184.                 {
  1185.                     if(!strcmp(pn(playerid), PlayerCar[i][Key2], false))
  1186.                     {
  1187.                         format(strii, sizeof strii, "[Gehliehen] Car %d - %s: %s-%s-%d", counter, PlayerVehicle[GetVehicleModel(PlayerCar[i][vid])-400], NSPraefix, PlayerCar[i][ABC], PlayerCar[i][NSID]);
  1188.                         SendClientMessage(playerid, COLOR_YELLOW, strii);
  1189.                         counter++;
  1190.                     }
  1191.                 }
  1192.             }
  1193.         }
  1194.         return 1;
  1195.     }
  1196.     return 0;
  1197. }
  1198. public OnPlayerEnterVehicle(playerid, vehicleid)
  1199. {
  1200.     return 1;
  1201. }
  1202. public OnPlayerStateChange(playerid, newstate, oldstate)
  1203. {
  1204.     if(newstate == PLAYER_STATE_DRIVER)
  1205.     {
  1206.         TextDrawShowForPlayer(playerid, Tacho[playerid]);
  1207.         if(!IsANoTachoVeh(GetPlayerVehicleID(playerid)))
  1208.         {
  1209.             SetTimerEx("Speedometer", 450, 1, "d", playerid);
  1210.         }
  1211.         new str[80], strr[150];
  1212.         for(new i = 0; i<MAX_VEHICLES; i++)
  1213.         {
  1214.             if(PlayerCar[i][vid] == GetPlayerVehicleID(playerid))
  1215.             {
  1216.                 new PlayerVehicleModelID = GetVehicleModel(PlayerCar[i][vid]);
  1217.                 PlayerVehicleModelID -= 400;
  1218.                 format(str, sizeof str, "Dieser %s gehört %s!", PlayerVehicle[PlayerVehicleModelID], PlayerCar[i][Key]);
  1219.                 SendClientMessage(playerid, COLOR_GREY, str);
  1220.                 return 1;
  1221.             }
  1222.         }
  1223.         for(new j = 0;j<sizeof(ShowCars);j++)
  1224.         {
  1225.             if(ShowCars[j][v_id] == GetPlayerVehicleID(playerid))
  1226.             {
  1227.                 format(strr, sizeof strr, "Datenblatt:\nFahrzeug: %s\nPreis: %d$", ShowCars[j][CarName], ShowCars[j][CarPreis]);
  1228.                 ShowPlayerDialog(playerid, BuyDiag, 0, "Fahrzeugkauf", strr, "Kaufen", "Abbrechen");
  1229.                 TogglePlayerControllable(playerid, 0);
  1230.                 return 1;
  1231.             }
  1232.         }
  1233.     }
  1234.     if(newstate == PLAYER_STATE_ONFOOT)
  1235.     {
  1236.         TextDrawHideForPlayer(playerid, Tacho[playerid]);
  1237.     }
  1238.     return 1;
  1239. }
  1240.  
  1241. public OnPlayerPickUpPickup(playerid, pickupid)
  1242. {
  1243.     return 1;
  1244. }
  1245.  
  1246. public OnVehicleMod(playerid, vehicleid, componentid)
  1247. {
  1248.     for(new i = 0; i <MAX_VEHICLES; i++)
  1249.     {
  1250.         if (vehicleid == PlayerCar[i][vid])
  1251.         {
  1252.             if((componentid >= 1008) && (componentid <= 1010)) {PlayerCar[i][Nitro] = componentid;}
  1253.             if((componentid >= 1142) && (componentid <= 1145)) {PlayerCar[i][Vent] = componentid;}
  1254.             if((componentid == 1013) || (componentid == 1024)) {PlayerCar[i][Lamp] = componentid;}
  1255.             if((componentid >= 1004) && (componentid <= 1005)||(componentid >= 1011) && (componentid <= 1012)) {PlayerCar[i][Hood] = componentid;}
  1256.             if(componentid == 1087) {PlayerCar[i][Hyd] = componentid;}
  1257.             if(componentid == 1086) {PlayerCar[i][Hyd] = componentid;}
  1258.             if(IsAWheel(componentid)) {PlayerCar[i][Wheel] = componentid;}
  1259.             if(IsAExhaust(componentid)) {PlayerCar[i][Auspuff] = componentid;}
  1260.             if(IsASideL(componentid)) {PlayerCar[i][SeiteL] = componentid; PlayerCar[i][SeiteR] = SideR;}
  1261.             if(IsASideR(componentid)) {PlayerCar[i][SeiteR] = componentid; PlayerCar[i][SeiteL] = SideL;}
  1262.             if(IsAFB(componentid)) {PlayerCar[i][FB] = componentid;}
  1263.             if(IsARB(componentid)) {PlayerCar[i][RB] = componentid;}
  1264.             if(IsASpoiler(componentid)) {PlayerCar[i][Spoiler] = componentid;}
  1265.             if(IsARoof(componentid)) {PlayerCar[i][Roof] = componentid;}
  1266.             return 1;
  1267.         }
  1268.     }
  1269.     return 1;
  1270. }
  1271.  
  1272. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1273. {
  1274.     return 1;
  1275. }
  1276.  
  1277. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1278. {
  1279.     for(new i = 0; i<MAX_VEHICLES; i++)
  1280.     {
  1281.         if(PlayerCar[i][vid] == vehicleid)
  1282.         {
  1283.             PlayerCar[i][c1] = color1;
  1284.             PlayerCar[i][c2] = color2;
  1285.         }
  1286.     }
  1287.     return 1;
  1288. }
  1289.  
  1290. public OnVehicleStreamIn(vehicleid, forplayerid)
  1291. {
  1292.     for(new i = 0; i<MAX_VEHICLES; i++)
  1293.     {
  1294.         if(vehicleid == PlayerCar[i][vid])
  1295.         {
  1296.             AddComponents(i);
  1297.             return 1;
  1298.         }
  1299.     }
  1300.     return 1;
  1301. }
  1302.  
  1303. public OnVehicleStreamOut(vehicleid, forplayerid)
  1304. {
  1305.     return 1;
  1306. }
  1307.  
  1308. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1309. {
  1310.     if(dialogid == BuyDiag)
  1311.     {
  1312.         if(response)
  1313.         {
  1314.             new price, co1, co2, mmmodel, str[50];
  1315.             for(new i = 0; i<sizeof ShowCars; i++)
  1316.             {
  1317.                 if(GetPlayerVehicleID(playerid) == ShowCars[i][v_id])
  1318.                 {
  1319.                     price = ShowCars[i][CarPreis];
  1320.                     co1 = ShowCars[i][Color1];
  1321.                     co2 = ShowCars[i][Color2];
  1322.                     mmmodel = ShowCars[i][mmodel];
  1323.                 }
  1324.             }
  1325.             new sform[128], i = CreateNumber(), Float:rrx, Float:rry, Float:rrz, Float:rra;
  1326.             format(sform,sizeof sform,"/Cars/%d.ini",i);
  1327.             for(new k = 0; k<sizeof CarRanges; k++)
  1328.             {
  1329.                 if(IsPlayerInRangeOfPoint(playerid, 50.0, CarRanges[k][0],CarRanges[k][1],CarRanges[k][2]))
  1330.                 {
  1331.                     rrx = CarSpawns[k][0];
  1332.                     rry = CarSpawns[k][1];
  1333.                     rrz = CarSpawns[k][2];
  1334.                     rra = CarSpawns[k][3];
  1335.                 }
  1336.             }
  1337.             if(!fexist(sform))
  1338.             {
  1339.                 if(GetPlayerMoney(playerid) > price)
  1340.                 {
  1341.                     if(Player[playerid][Own] < MaxCarsOwn)
  1342.                     {
  1343.                         GivePlayerMoney(playerid, -price);
  1344.                         SendClientMessage(playerid, COLOR_YELLOW, "Glückwunsch zu deinem neuen Fahrzeug!");
  1345.                         PlayerCar[i][NS] = Create3DTextLabel("", COLOR_NS, 0.0, 0.0, 0.0, 50.0, 0, 0);
  1346.                         PlayerCar[i][px] = rrx;
  1347.                         PlayerCar[i][py] = rry;
  1348.                         PlayerCar[i][pz] = rrz;
  1349.                         PlayerCar[i][pa] = rra;
  1350.                         PlayerCar[i][c1] = co1;
  1351.                         PlayerCar[i][c2] = co2;
  1352.                         PlayerCar[i][Fuel] = 100;
  1353.                         PlayerCar[i][model] = mmmodel;
  1354.                         PlayerCar[i][NSID] = i;
  1355.                         Player[playerid][Own]++;
  1356.                         PlayerCar[i][BuyPrice] = price;
  1357.                         format(PlayerCar[i][Key], MAX_PLAYER_NAME, "%s", pn(playerid));
  1358.                         PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1);
  1359.                         format(PlayerCar[i][ABC], 11, "%s", CreateABC());
  1360.                         format(str, sizeof str, "%s-%s-0%d", NSPraefix, PlayerCar[i][ABC], PlayerCar[i][NSID]);
  1361.                         Update3DTextLabelText(PlayerCar[i][NS], COLOR_NS, str);
  1362.                         Attach3DTextLabelToVehicle(PlayerCar[i][NS], PlayerCar[i][vid], 0.0, 0.0, NSHoehe);
  1363.                         TogglePlayerControllable(playerid, 1);
  1364.                         RemovePlayerFromVehicle(playerid);
  1365.                         new File:f; f=fopen(sform,io_write); if(f) { fclose(f); }
  1366.                     }
  1367.                     else
  1368.                     {
  1369.                         new string[50];
  1370.                         format(string, sizeof string, "Du hast schon %d Fahrzeuge!", MaxCarsOwn);
  1371.                         SendClientMessage(playerid, COLOR_GREY, string);
  1372.                     }
  1373.                 }
  1374.                 else
  1375.                 {
  1376.                     SendClientMessage(playerid, COLOR_GREY, "Du hast nicht genug Geld!");
  1377.                     RemovePlayerFromVehicle(playerid);
  1378.                     TogglePlayerControllable(playerid, 1);
  1379.                 }
  1380.             }
  1381.         }
  1382.         if(!response)
  1383.         {
  1384.             RemovePlayerFromVehicle(playerid);
  1385.             TogglePlayerControllable(playerid, 1);
  1386.         }
  1387.     }
  1388.     return 1;
  1389. }
  1390.  
  1391. CreateABC()
  1392. {
  1393.         new bla1 = random(26), bla2 = random(26), str[10];
  1394.         format(str, sizeof str, "%s%s", ABCD[bla1], ABCD[bla2]);
  1395.         return str;
  1396. }
  1397. stock pn(playerid)
  1398. {
  1399.     new n[MAX_PLAYER_NAME];
  1400.     GetPlayerName(playerid, n, sizeof n);
  1401.     return n;
  1402. }
  1403. public SaveCar(i)
  1404. {
  1405.     new sform[128];
  1406.     format(sform, sizeof sform, "/Cars/%d.ini", i);
  1407.     if(fexist(sform))
  1408.     {
  1409.         if(INI_Open(sform))
  1410.         {
  1411.             INI_WriteFloat("px", PlayerCar[i][px]);
  1412.             INI_WriteFloat("py", PlayerCar[i][py]);
  1413.             INI_WriteFloat("pz", PlayerCar[i][pz]);
  1414.             INI_WriteFloat("pa", PlayerCar[i][pa]);
  1415.             INI_WriteInt("model", PlayerCar[i][model]);
  1416.             INI_WriteInt("c1", PlayerCar[i][c1]);
  1417.             INI_WriteInt("c2", PlayerCar[i][c2]);
  1418.             INI_WriteString("Key", PlayerCar[i][Key]);
  1419.             INI_WriteString("Key2", PlayerCar[i][Key2]);
  1420.             INI_WriteInt("Rented", PlayerCar[i][Rented]);
  1421.             INI_WriteString("ABC", PlayerCar[i][ABC]);
  1422.             INI_WriteInt("Fuel", PlayerCar[i][Fuel]);
  1423.             INI_WriteInt("NSID", PlayerCar[i][NSID]);
  1424.             INI_WriteInt("BuyPrice", PlayerCar[i][BuyPrice]);
  1425.             INI_WriteInt("Lock", PlayerCar[i][Lock]);
  1426.             INI_WriteInt("Nitro", PlayerCar[i][Nitro]);
  1427.             INI_WriteInt("Hyd", PlayerCar[i][Hyd]);
  1428.             INI_WriteInt("Wheel", PlayerCar[i][Wheel]);
  1429.             INI_WriteInt("Auspuff", PlayerCar[i][Auspuff]);
  1430.             INI_WriteInt("SeiteL", PlayerCar[i][SeiteL]);
  1431.             INI_WriteInt("SeiteR", PlayerCar[i][SeiteR]);
  1432.             INI_WriteInt("FB", PlayerCar[i][FB]);
  1433.             INI_WriteInt("RB", PlayerCar[i][RB]);
  1434.             INI_WriteInt("Spoiler", PlayerCar[i][Spoiler]);
  1435.             INI_WriteInt("Roof", PlayerCar[i][Roof]);
  1436.             INI_WriteInt("Hood", PlayerCar[i][Hood]);
  1437.             INI_WriteInt("Vent", PlayerCar[i][Vent]);
  1438.             INI_WriteInt("Lamp", PlayerCar[i][Lamp]);
  1439.             INI_Save();
  1440.             INI_Close();
  1441.         }
  1442.     }
  1443.     return 1;
  1444. }
  1445. public LoadCar(i)
  1446. {
  1447.     new path[128], str[30];
  1448.     format(path, sizeof path, "/Cars/%d.ini", i);
  1449.     if(fexist(path))
  1450.     {
  1451.         if(INI_Open(path))
  1452.         {
  1453.             PlayerCar[i][px] = INI_ReadFloat("px");
  1454.             PlayerCar[i][py] = INI_ReadFloat("py");
  1455.             PlayerCar[i][pz] = INI_ReadFloat("pz");
  1456.             PlayerCar[i][pa] = INI_ReadFloat("pa");
  1457.             PlayerCar[i][model] = INI_ReadInt("model");
  1458.             PlayerCar[i][c1] = INI_ReadInt("c1");
  1459.             PlayerCar[i][c2] = INI_ReadInt("c2");
  1460.             PlayerCar[i][Lock] = INI_ReadInt("Lock");
  1461.             PlayerCar[i][BuyPrice] = INI_ReadInt("BuyPrice");
  1462.             PlayerCar[i][Fuel] = INI_ReadInt("Fuel");
  1463.             PlayerCar[i][NSID] = INI_ReadInt("NSID");
  1464.             PlayerCar[i][Nitro] = INI_ReadInt("Nitro");
  1465.             PlayerCar[i][Hyd] = INI_ReadInt("Hyd");
  1466.             PlayerCar[i][Wheel] = INI_ReadInt("Wheel");
  1467.             PlayerCar[i][Auspuff] = INI_ReadInt("Auspuff");
  1468.             PlayerCar[i][SeiteL] = INI_ReadInt("SeiteL");
  1469.             PlayerCar[i][SeiteR] = INI_ReadInt("SeiteR");
  1470.             PlayerCar[i][FB] = INI_ReadInt("FB");
  1471.             PlayerCar[i][RB] = INI_ReadInt("RB");
  1472.             PlayerCar[i][Spoiler] = INI_ReadInt("Spoiler");
  1473.             PlayerCar[i][Roof] = INI_ReadInt("Roof");
  1474.             PlayerCar[i][Hood] = INI_ReadInt("Hood");
  1475.             PlayerCar[i][Vent] = INI_ReadInt("Vent");
  1476.             PlayerCar[i][Lamp] = INI_ReadInt("Lamp");
  1477.             PlayerCar[i][Rented] = INI_ReadInt("Rented");
  1478.             INI_ReadString(PlayerCar[i][ABC], "ABC", 11);
  1479.             INI_ReadString(PlayerCar[i][Key], "Key", MAX_PLAYER_NAME);
  1480.             INI_ReadString(PlayerCar[i][Key2], "Key2", MAX_PLAYER_NAME);
  1481.             INI_Close();
  1482.             PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1);
  1483.             printf("Fahrzeug %d geladen & erstellt! [BESITZER: %s] [NUMMERNSCHILD: %s-%s-%d]", i, PlayerCar[i][Key], NSPraefix, PlayerCar[i][ABC], PlayerCar[i][NSID]);
  1484.             format(str, sizeof str, "%s-%s-0%d", NSPraefix, PlayerCar[i][ABC], i);
  1485.             PlayerCar[i][NS] = Create3DTextLabel("", COLOR_NS, 0.0, 0.0, 0.0, 50.0, 0, 0);
  1486.             Update3DTextLabelText(PlayerCar[i][NS], COLOR_NS, str);
  1487.             Attach3DTextLabelToVehicle(PlayerCar[i][NS], PlayerCar[i][vid], 0.0, 0.0, NSHoehe);
  1488.         }
  1489.     }
  1490.     return 1;
  1491. }
  1492. stock SetVehicleParams4All(veid, obj, lock)
  1493. {
  1494.     for(new i = 0; i<MAX_PLAYERS; i++)
  1495.     {
  1496.         SetVehicleParamsForPlayer(veid, i, obj, lock);
  1497.     }
  1498.     return 1;
  1499. }
  1500. public Save()
  1501. {
  1502.     for(new i = 0; i<MAX_VEHICLES; i++)
  1503.     {
  1504.         SaveCar(i);
  1505.     }
  1506.     return 1;
  1507. }
  1508. public AddComponents(i)
  1509. {
  1510.     if(PlayerCar[i][Nitro] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Nitro]); }
  1511.     if(PlayerCar[i][Hyd] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Hyd]); }
  1512.     if(PlayerCar[i][Wheel] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Wheel]); }
  1513.     if(PlayerCar[i][Auspuff] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Auspuff]); }
  1514.     if(PlayerCar[i][SeiteL] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][SeiteL]); }
  1515.     if(PlayerCar[i][SeiteR] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][SeiteR]); }
  1516.     if(PlayerCar[i][FB] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][FB]); }
  1517.     if(PlayerCar[i][RB] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][RB]); }
  1518.     if(PlayerCar[i][Spoiler] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Spoiler]); }
  1519.     if(PlayerCar[i][Roof] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Roof]); }
  1520.     if(PlayerCar[i][Hood] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Hood]); }
  1521.     if(PlayerCar[i][Vent] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Vent]); }
  1522.     if(PlayerCar[i][Lamp] != 0) { AddVehicleComponent(PlayerCar[i][vid],PlayerCar[i][Lamp]); }
  1523.     ChangeVehicleColor(PlayerCar[i][vid],PlayerCar[i][c1],PlayerCar[i][c2]);
  1524.     return 1;
  1525. }
  1526. public IsASideR(componentid)
  1527. {
  1528.     if(componentid == 1007){SideL = 1017;return 1;}
  1529.     if(componentid == 1026){SideL = 1027;return 1;}
  1530.     if(componentid == 1030){SideL = 1031;return 1;}
  1531.     if(componentid == 1040){SideL = 1036;return 1;}
  1532.     if(componentid == 1041){SideL = 1039;return 1;}
  1533.     if(componentid == 1042){SideL = 1099;return 1;}
  1534.     if(componentid == 1051){SideL = 1047;return 1;}
  1535.     if(componentid == 1048){SideL = 1052;return 1;}
  1536.     if(componentid == 1056){SideL = 1062;return 1;}
  1537.     if(componentid == 1063){SideL = 1057;return 1;}
  1538.     if(componentid == 1069){SideL = 1071;return 1;}
  1539.     if(componentid == 1072){SideL = 1070;return 1;}
  1540.     if(componentid == 1094){SideL = 1090;return 1;}
  1541.     if(componentid == 1093){SideL = 1095;return 1;}
  1542.     if(componentid == 1122){SideL = 1101;return 1;}
  1543.     if(componentid == 1102){SideL = 1133;return 1;}
  1544.     if(componentid == 1124){SideL = 1106;return 1;}
  1545.     if(componentid == 1107){SideL = 1108;return 1;}
  1546.     if(componentid == 1118){SideL = 1120;return 1;}
  1547.     if(componentid == 1137){SideL = 1134;return 1;}
  1548.     return 0;
  1549. }
  1550.  
  1551. public IsASideL(componentid)
  1552. {
  1553.     if(componentid == 1134){SideR = 1137;return 1;}
  1554.     if(componentid == 1119){SideR = 1121;return 1;}
  1555.     if(componentid == 1120){SideR = 1118;return 1;}
  1556.     if(componentid == 1108){SideR = 1107;return 1;}
  1557.     if(componentid == 1017){SideR = 1007;return 1;}
  1558.     if(componentid == 1027){SideR = 1026;return 1;}
  1559.     if(componentid == 1031){SideR = 1030;return 1;}
  1560.     if(componentid == 1036){SideR = 1040;return 1;}
  1561.     if(componentid == 1039){SideR = 1041;return 1;}
  1562.     if(componentid == 1099){SideR = 1042;return 1;}
  1563.     if(componentid == 1047){SideR = 1051;return 1;}
  1564.     if(componentid == 1052){SideR = 1048;return 1;}
  1565.     if(componentid == 1062){SideR = 1056;return 1;}
  1566.     if(componentid == 1057){SideR = 1063;return 1;}
  1567.     if(componentid == 1071){SideR = 1069;return 1;}
  1568.     if(componentid == 1070){SideR = 1072;return 1;}
  1569.     if(componentid == 1090){SideR = 1094;return 1;}
  1570.     if(componentid == 1095){SideR = 1093;return 1;}
  1571.     if(componentid == 1095){SideR = 1093;return 1;}
  1572.     if(componentid == 1101){SideR = 1122;return 1;}
  1573.     if(componentid == 1133){SideR = 1102;return 1;}
  1574.     if(componentid == 1106){SideR = 1124;return 1;}
  1575.     return 0;
  1576. }
  1577.  
  1578. public IsAFB(componentid)
  1579. {
  1580.     if(componentid >= 1152 && componentid <= 1153 || componentid >= 1165 && componentid <= 1166){return 1;}
  1581.     if(componentid == 1155 || componentid == 1157 || componentid == 1160 || componentid == 1176 || componentid == 1179 || componentid == 1185){return 1;}
  1582.     if(componentid >= 1169 && componentid <= 1174 || componentid >= 1181 && componentid <= 1182){return 1;}
  1583.     if(componentid >= 1188 && componentid <= 1191){return 1;}
  1584.     return 0;
  1585. }
  1586.  
  1587. public IsARB(componentid)
  1588. {
  1589.     if(componentid >= 1140 && componentid <= 1141 || componentid >= 1148 && componentid <= 1151){return 1;}
  1590.     if(componentid == 1154 || componentid == 1156 || componentid == 1159 || componentid == 1161 || componentid == 1175 || componentid == 1180){return 1;}
  1591.     if(componentid >= 1167 && componentid <= 1168 || componentid >= 1177 && componentid <= 1178){return 1;}
  1592.     if(componentid >= 1183 && componentid <= 1184 || componentid >= 1186 && componentid <= 1187){return 1;}
  1593.     if(componentid >= 1192 && componentid <= 1193){return 1;}
  1594.     return 0;
  1595. }
  1596.  
  1597. public IsASpoiler(componentid)
  1598. {
  1599.     if(componentid >= 1000 && componentid <= 1003 || componentid >= 1014 && componentid <= 1016){return 1;}
  1600.     if(componentid == 1023 || componentid == 1058 || componentid == 1158){return 1;}
  1601.     if(componentid >= 1049 && componentid <= 1050 || componentid >= 1138 && componentid <= 1139){return 1;}
  1602.     if(componentid >= 1146 && componentid <= 1147 || componentid >= 1162 && componentid <= 1164){return 1;}
  1603.     return 0;
  1604. }
  1605.  
  1606. public IsARoof(componentid)
  1607. {
  1608.     if(componentid >= 1032 && componentid <= 1033 || componentid >= 1053 && componentid <= 1055){return 1;}
  1609.     if(componentid == 1035 || componentid == 1038 || componentid == 1061 || componentid == 1088 || componentid == 1091){return 1;}
  1610.     if(componentid == 1103 || componentid == 1128){return 1;}
  1611.     if(componentid >= 1067 && componentid <= 1068 || componentid >= 1130 && componentid <= 1131){return 1;}
  1612.     return 0;
  1613. }
  1614.  
  1615. public IsAExhaust(componentid)
  1616. {
  1617.     if(componentid >= 1018 && componentid <= 1022){return 1;}
  1618.     if(componentid >= 1028 && componentid <= 1029){return 1;}
  1619.     if(componentid == 1037 || componentid == 1059 || componentid == 1089 || componentid == 1092 || componentid == 1132){return 1;}
  1620.     if(componentid == 1104 || componentid == 1105 || componentid == 1113 || componentid == 1114 || componentid == 1129){return 1;}
  1621.     if(componentid == 1135 || componentid == 1136){return 1;}
  1622.     if(componentid >= 1043 && componentid <= 1046){return 1;}
  1623.     if(componentid >= 1126 && componentid <= 1127){return 1;}
  1624.     if(componentid >= 1064 && componentid <= 1066){return 1;}
  1625.     return 0;
  1626. }
  1627.  
  1628. public IsAWheel(componentid)
  1629. {
  1630.     if(componentid >= 1073 && componentid <= 1085) { return 1; }
  1631.     if(componentid >= 1096 && componentid <= 1098){ return 1; }
  1632.     if(componentid == 1025){ return 1; }
  1633.     return 0;
  1634. }
  1635. public CreateNumber()
  1636. {
  1637.     new id = vrandom(MIN_ID, MAX_ID);
  1638.     new path[128];
  1639.     format(path,sizeof path,"/Cars/%d.ini",id);
  1640.     generate_id:
  1641.     while(fexist(path))
  1642.     {
  1643.         id = vrandom(MIN_ID, MAX_ID);
  1644.     }
  1645.     if(fexist(path))
  1646.     {
  1647.         goto generate_id;
  1648.     }
  1649.     return id;
  1650. }
  1651. public vrandom(min, max)
  1652. {
  1653.     new output;
  1654.     while(output < min)
  1655.     {
  1656.         output = random(max);
  1657.     }
  1658.     return output;
  1659. }
  1660.  
  1661. strtok(const string[], &index)
  1662. {
  1663.     new length = strlen(string);
  1664.     while ((index < length) && (string[index] <= ' '))
  1665.     {
  1666.         index++;
  1667.     }
  1668.  
  1669.     new offset = index;
  1670.     new result[20];
  1671.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  1672.     {
  1673.         result[index - offset] = string[index];
  1674.         index++;
  1675.     }
  1676.     result[index - offset] = EOS;
  1677.     return result;
  1678. }
  1679. public IsAtGasStation(playerid)
  1680. {
  1681.     if(IsPlayerConnected(playerid))
  1682.     {
  1683.         if(IsPlayerInRangeOfPoint(playerid,15.0,1004.0070,-939.3102,42.1797) || IsPlayerInRangeOfPoint(playerid,15.0,1944.3260,-1772.9254,13.3906))
  1684.         {
  1685.             return 1;
  1686.         }
  1687.         else if(IsPlayerInRangeOfPoint(playerid,15.0,-90.5515,-1169.4578,2.4079) || IsPlayerInRangeOfPoint(playerid,15.0,-1609.7958,-2718.2048,48.5391))
  1688.         {
  1689.             return 1;
  1690.         }
  1691.         else if(IsPlayerInRangeOfPoint(playerid,15.0,-2029.4968,156.4366,28.9498) || IsPlayerInRangeOfPoint(playerid,15.0,-2408.7590,976.0934,45.4175))
  1692.         {
  1693.             return 1;
  1694.         }
  1695.         else if(IsPlayerInRangeOfPoint(playerid,15.0,-2243.9629,-2560.6477,31.8841) || IsPlayerInRangeOfPoint(playerid,6.0,-1676.6323,414.0262,6.9484))
  1696.         {
  1697.             return 1;
  1698.         }
  1699.         else if(IsPlayerInRangeOfPoint(playerid,15.0,2202.2349,2474.3494,10.5258) || IsPlayerInRangeOfPoint(playerid,15.0,614.9333,1689.7418,6.6968))
  1700.         {
  1701.             return 1;
  1702.         }
  1703.         else if(IsPlayerInRangeOfPoint(playerid,15.0,-1328.8250,2677.2173,49.7665) || IsPlayerInRangeOfPoint(playerid,15.0,70.3882,1218.6783,18.5165))
  1704.         {
  1705.             return 1;
  1706.         }
  1707.         else if(IsPlayerInRangeOfPoint(playerid,15.0,2113.7390,920.1079,10.5255) || IsPlayerInRangeOfPoint(playerid,15.0,-1327.7218,2678.8723,50.0625))
  1708.         {
  1709.             return 1;
  1710.         }
  1711.         else if(IsPlayerInRangeOfPoint(playerid,15.0,2146.6143,2748.4758,10.3852)||IsPlayerInRangeOfPoint(playerid,15.0,2639.0022,1108.0353,10.3852))
  1712.         {
  1713.             return 1;
  1714.         }
  1715.         else if(IsPlayerInRangeOfPoint(playerid,15.0,1598.2035,2198.6448,10.3856))
  1716.         {
  1717.             return 1;
  1718.         }
  1719.     }
  1720.     return 0;
  1721. }
  1722.  
  1723. public Gas()
  1724. {
  1725.     for(new j=0;j<MAX_PLAYERS;j++)
  1726.     {
  1727.         if(IsPlayerConnected(j))
  1728.         {
  1729.             for(new i = 0; i<MAX_VEHICLES; i++)
  1730.             {
  1731.                 new vehicle = GetPlayerVehicleID(j);
  1732.                 new Model = GetVehicleModel(vehicle);
  1733.                 if(PlayerCar[i][vid] == vehicle)
  1734.                 {
  1735.                     if(IsPlayerInVehicle(j, vehicle))
  1736.                     {
  1737.                         if(PlayerCar[i][Fuel] > 0)
  1738.                         {
  1739.                             if(PlayerCar[i][Fuel] <= 10) { PlayerPlaySound(j, 1085, 0.0, 0.0, 0.0); }
  1740.                             if(IsAPlane(vehicle) || IsABoat(vehicle) || Model == 462 || Model == 481 || Model == 509 || Model == 510)
  1741.                             {
  1742.                                 PlayerCar[i][Fuel]++;
  1743.                             }
  1744.                             PlayerCar[i][Fuel]--;
  1745.                         }
  1746.                         else
  1747.                         {
  1748.                             TogglePlayerControllable(j, 0);
  1749.                             GameTextForPlayer(j,"~w~~n~~n~~n~~n~~n~~n~~n~~n~Der Tank ist leer!~n~Mit der Entertaste kannst du das Fahrzeug verlassen!",3000,3);
  1750.                         }
  1751.                         if(PlayerCar[i][Fuel] > 100)
  1752.                         {
  1753.                             PlayerCar[i][Fuel] = 100;
  1754.                         }
  1755.                     }
  1756.                 }
  1757.             }
  1758.         }
  1759.     }
  1760.     return 1;
  1761. }
  1762.  
  1763. public IsABoat(carid)
  1764. {
  1765.     new m = GetVehicleModel(carid);
  1766.     if(m == 472 || m == 473 || m == 493 || m == 595 || m == 484 || m == 430)
  1767.     {
  1768.         return 1;
  1769.     }
  1770.     if(m == 452 || m == 446 || m == 454)
  1771.     {
  1772.         return 1;
  1773.     }
  1774.     return 0;
  1775. }
  1776.  
  1777. public IsAPlane(carid)
  1778. {
  1779.     new modeel = GetVehicleModel(carid);
  1780.     if(modeel == 592 || modeel == 577 || modeel == 511 || modeel == 512 || modeel == 593 || modeel == 520)
  1781.     {
  1782.         return 1;
  1783.     }
  1784.     if(modeel == 553 || modeel == 476 || modeel == 519 || modeel == 460 || modeel == 513 || modeel == 548)
  1785.     {
  1786.         return 1;
  1787.     }
  1788.     if(modeel == 425 || modeel == 417 || modeel == 487 || modeel == 488 || modeel == 497 || modeel == 563)
  1789.     {
  1790.         return 1;
  1791.     }
  1792.     if(modeel == 447 || modeel == 469)
  1793.     {
  1794.         return 1;
  1795.     }
  1796.     return 0;
  1797. }
  1798.  
  1799. public FillGas(OldFuel, i, playerid)
  1800. {
  1801.     new price = 100 - OldFuel, str[50];
  1802.     price = price*2;
  1803.     PlayerCar[i][Fuel] = 100;
  1804.     TogglePlayerControllable(playerid, 1);
  1805.     GivePlayerMoney(playerid, -price);
  1806.     format(str, sizeof str, "Fahrzeug für %d$ betankt!", price);
  1807.     SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  1808.     return 1;
  1809. }
  1810.  
  1811. public Speedometer(playerid)
  1812. {
  1813.     if(IsPlayerInAnyVehicle(playerid))
  1814.     {
  1815.         new vehicleid = GetPlayerVehicleID(playerid), Float:speed_x, Float:speed_y, Float:speed_z, Float:final_speed, speed_string[256], final_speed_int, Float:chealth, LocationZone[MAX_ZONE_NAME], m = GetVehicleModel(vehicleid), f;
  1816.         for(new i = 0; i<MAX_VEHICLES; i++)
  1817.         {
  1818.             if(GetPlayerVehicleID(playerid) == PlayerCar[i][vid])
  1819.             {
  1820.                 f = PlayerCar[i][Fuel];
  1821.             }
  1822.         }
  1823.         m -= 400;
  1824.         GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
  1825.         final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*144; // 136.666667 = kmph  // 85.4166672= mph
  1826.         final_speed_int = floatround(final_speed,floatround_round);
  1827.         GetVehicleHealth(vehicleid, chealth);
  1828.         GetPlayer2DZone(playerid, LocationZone, MAX_ZONE_NAME);
  1829.         format(speed_string,200,"~B~Fahrzeug: ~W~%s~n~~B~Km/h: ~W~%d km/h~n~~B~Zustand: ~W~%d%%~n~~B~Benzin: ~W~%d%%~n~~B~GPS: ~W~%s",PlayerVehicle[m], final_speed_int, floatround(chealth, floatround_round)/10, f, LocationZone);
  1830.         TextDrawSetString(Tacho[playerid], speed_string);
  1831.         return 1;
  1832.     }
  1833.     else
  1834.     {
  1835.         TextDrawHideForPlayer(playerid, Tacho[playerid]);
  1836.     }
  1837.     return 1;
  1838. }
  1839.  
  1840. stock GetPlayer2DZone(playerid, zone[], len)
  1841. {
  1842.     new Float:x, Float:y, Float:z;
  1843.     GetPlayerPos(playerid, x, y, z);
  1844.     for(new i = 0; i != sizeof(SA_GPS_ZONE_NAMES); i++ ){
  1845.     if(x >= SA_GPS_ZONE_NAMES[i][Zone_Area][0] && x <= SA_GPS_ZONE_NAMES[i][Zone_Area][3] && y >= SA_GPS_ZONE_NAMES[i][Zone_Area][1] && y <= SA_GPS_ZONE_NAMES[i][Zone_Area][4]){
  1846.     return format(zone, len, SA_GPS_ZONE_NAMES[i][Zone_Name], 0);}
  1847.     }
  1848.     return 0;
  1849. }
  1850.  
  1851. public IsANoTachoVeh(vehid)
  1852. {
  1853.     new m = GetVehicleModel(vehid);
  1854.     if(m == 509 || m == 510 || m == 481)
  1855.     {
  1856.         return 1;
  1857.     }
  1858.     return 0;
  1859. }
  1860. public Respawn(vehicleid)
  1861. {
  1862.     for(new i = 0; i<MAX_VEHICLES; i++)
  1863.     {
  1864.         if(PlayerCar[i][vid] == vehicleid)
  1865.         {
  1866.             DestroyVehicle(PlayerCar[i][vid]);
  1867.             PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1);
  1868.             return 1;
  1869.         }
  1870.     }
  1871.     return 1;
  1872. }
  1873. public CheckLock()
  1874. {
  1875.     new p, p2;
  1876.     for(new i = 0; i<MAX_VEHICLES; i++)
  1877.     {
  1878.         if(PlayerCar[i][Lock])
  1879.         {
  1880.             p = ReturnUser(PlayerCar[i][Key]);
  1881.             p2 = ReturnUser(PlayerCar[i][Key2]);
  1882.             SetVehicleParams4All(PlayerCar[i][vid], 0, 1);
  1883.             if(IsPlayerConnected(p)) { SetVehicleParamsForPlayer(PlayerCar[i][vid], p, 0, 0); }
  1884.             if(IsPlayerConnected(p2)) { SetVehicleParamsForPlayer(PlayerCar[i][vid], p2, 0, 0); }
  1885.         }
  1886.         else if(!PlayerCar[i][Lock])
  1887.         {
  1888.             SetVehicleParams4All(PlayerCar[i][vid], 0, 0);
  1889.         }
  1890.     }
  1891.     return 1;
  1892. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement