carshops = {
    --{posX,posY,posZ,rot,name,skinID,type(1-civil,2-szervezeti,3-bicikli,4-hajó)}
    {1111.9215087891, -1797.1430664063, 16.59375, 90, "Jackson White", 32, 1},
    --{1671.5196533203, 1814.2491455078, 10.8203125, 90, "Mike Smith", 32, 1},
    {1219.3916015625, -1811.7043457031, 16.59375, 180, "Paul Johnson", 33, 2},

    {397.77462768555,-1806.2298583984,7.8381171226501, 0, "Olivia Clark", 41, 4},
    {1730.6047363281,-2237.5915527344,13.543190002441, 180, "David Williams", 123, 5},
}

components = {
    ["boot_dummy"] = {"Csomagtartó",1,false},
    ["door_rf_dummy"] = {"Jobb első ajtó",3,false},
    ["door_lf_dummy"] = {"Bal első ajtó",2,false},
    ["door_rr_dummy"] = {"Jobb hátsó ajtó",5,false},
    ["door_lr_dummy"] = {"Bal hátsó ajtó",4,false},
    ["bonnet_dummy"] = {"Motorháztető",0,false},
   -- ["windscreen_dummy"] = {"Interior",10,false},
}

vehicle_show_pos = {
    [1] = {1141.09999, -1810.699999, 5.6, 40},
    [2] = {1141.09999, -1810.699999, 5.6, 40},
    [3] = {1677.361328125, -1615.4437255859, 13.546875, 328},
    [4] = {419.83602905273,-1940.8470458984,-0.71143805980682, 280},
    [5] = {1765.6369628906, -2286.2927246094, 27.626398086548, 0},
}

vehicle_show_camera = {
    [1] = {1140.9030761719,-1802.833984375,6.858499526978,1140.9281005859,-1803.8068847656,6.628606796265},
    [2] = {1140.9030761719,-1802.833984375,6.858499526978,1140.9281005859,-1803.8068847656,6.628606796265},
    [3] = {1681.7790527344,-1620.1762695313,14.71010017395,1681.0744628906,-1619.5052490234,14.479385375977},
    [4] = {434.5546875,-1923.943359375,5.4481000900269,433.97964477539,-1924.7554931641,5.3490438461304},
    [5] = {1749.6381835938,-2273.1118164062,28.201000213623,1750.4226074219,-2273.6723632812,27.935474395752},
}

carshop_names = {"Járműkereskedés", "Szervezeti járműkereskedés", "Kerékpár kereskedés", "Hajókereskedés", "Helikopter kereskedés"}
carshopBlipIDs = {8, 8, 33, 32, 61}
testDrives = {"Vidék", "Város", "Tesztpálya"}

testPos = {
    {2374.2170410156, -647.62426757813, 127.42464447021, 262},
    {1077.7437744141, -1772.6419677734, 13.350935935974, 89},
    {1788.9230957031, -1070.2019042969, 23.9609375, 176},
}

carSpawnPos = {
    --{x,y,z,rot}
    [1] = {
        ["ls"] = {
            {1098.4211425781, -1775.5446777344, 13.344514846802, 90},
            {1098.4211425781, -1772.6749267578, 13.346617698669, 90},
            {1098.4211425781, -1767.6749267578, 13.346617698669, 90},
            {1098.4211425781, -1764.6749267578, 13.346617698669, 90},
            {1098.4211425781, -1761.6749267578, 13.346617698669, 90},
            {1098.4211425781, -1758.6749267578, 13.346617698669, 90},
            {1098.4211425781, -1755.6749267578, 13.346617698669, 90},
            {1083.4211425781, -1775.5446777344, 13.344514846802, 270},
            {1083.4211425781, -1772.6749267578, 13.346617698669, 270},
            {1083.4211425781, -1767.6749267578, 13.346617698669, 270},
            {1083.4211425781, -1764.6749267578, 13.346617698669, 270},
            {1083.4211425781, -1761.6749267578, 13.346617698669, 270},
            {1083.4211425781, -1758.6749267578, 13.346617698669, 270},
            {1083.4211425781, -1755.6749267578, 13.346617698669, 270},
            {1077.4211425781, -1775.5446777344, 13.344514846802, 90},
            {1077.4211425781, -1772.6749267578, 13.346617698669, 90},
            {1077.4211425781, -1767.6749267578, 13.346617698669, 90},
            {1077.4211425781, -1764.6749267578, 13.346617698669, 90},
            {1077.4211425781, -1761.6749267578, 13.346617698669, 90},
            {1077.4211425781, -1758.6749267578, 13.346617698669, 90},
            {1077.4211425781, -1755.6749267578, 13.346617698669, 90},
            {1062.4211425781, -1775.5446777344, 13.344514846802, 270},
            {1062.4211425781, -1772.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1767.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1764.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1761.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1758.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1755.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1752.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1749.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1746.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1743.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1740.6749267578, 13.346617698669, 270},
            {1062.4211425781, -1737.6749267578, 13.346617698669, 270},
        },

        ["lv"] = {
            {1731.4187011719, 1887.3898925781, 10.8203125, 90},
            {1731.4187011719, 1893.3898925781, 10.8203125, 90},
            {1731.4187011719, 1899.3898925781, 10.8203125, 90},
            {1731.4187011719, 1905.3898925781, 10.8203125, 90},
            {1731.4187011719, 1911.3898925781, 10.8203125, 90},
            {1731.4187011719, 1917.3898925781, 10.8203125, 90},
            {1731.4187011719, 1923.3898925781, 10.8203125, 90},
            {1731.4187011719, 1929.3898925781, 10.8203125, 90},
            {1731.4187011719, 1935.3898925781, 10.8203125, 90},
            {1731.4187011719, 1941.3898925781, 10.8203125, 90},
            {1731.4187011719, 1947.3898925781, 10.8203125, 90},
            {1731.4187011719, 1953.3898925781, 10.8203125, 90},
            {1731.4187011719, 1959.3898925781, 10.8203125, 90},
            {1731.4187011719, 1965.3898925781, 10.8203125, 90},
            {1731.4187011719, 1971.3898925781, 10.8203125, 90},
            {1731.4187011719, 1977.3898925781, 10.8203125, 90},
            {1731.4187011719, 1983.3898925781, 10.8203125, 90},
            {1731.4187011719, 1989.3898925781, 10.8203125, 90},
            {1731.4187011719, 1995.3898925781, 10.8203125, 90},
            {1731.4187011719, 2001.3898925781, 10.8203125, 90},
            {1731.4187011719, 2007.3898925781, 10.8203125, 90},
            {1731.4187011719, 2013.3898925781, 10.8203125, 90},
            {1731.4187011719, 2019.3898925781, 10.8203125, 90},
            {1742.4187011719, 1887.3898925781, 10.8203125, 270},
            {1742.4187011719, 1893.3898925781, 10.8203125, 270},
            {1742.4187011719, 1899.3898925781, 10.8203125, 270},
            {1742.4187011719, 1905.3898925781, 10.8203125, 270},
            {1742.4187011719, 1911.3898925781, 10.8203125, 270},
            {1742.4187011719, 1917.3898925781, 10.8203125, 270},
            {1742.4187011719, 1923.3898925781, 10.8203125, 270},
            {1742.4187011719, 1929.3898925781, 10.8203125, 270},
            {1742.4187011719, 1935.3898925781, 10.8203125, 270},
            {1742.4187011719, 1941.3898925781, 10.8203125, 270},
            {1742.4187011719, 1947.3898925781, 10.8203125, 270},
            {1742.4187011719, 1953.3898925781, 10.8203125, 270},
            {1742.4187011719, 1959.3898925781, 10.8203125, 270},
            {1742.4187011719, 1965.3898925781, 10.8203125, 270},
            {1742.4187011719, 1971.3898925781, 10.8203125, 270},
            {1742.4187011719, 1977.3898925781, 10.8203125, 270},
            {1742.4187011719, 1983.3898925781, 10.8203125, 270},
            {1742.4187011719, 1989.3898925781, 10.8203125, 270},
            {1742.4187011719, 1995.3898925781, 10.8203125, 270},
            {1742.4187011719, 2001.3898925781, 10.8203125, 270},
            {1742.4187011719, 2007.3898925781, 10.8203125, 270},
            {1742.4187011719, 2013.3898925781, 10.8203125, 270},
            {1742.4187011719, 2019.3898925781, 10.8203125, 270},
        },
    },

    [2] = {
        {1262.5496826172, -1796.7447509766, 13.417814254761, 180},
        {1268.5496826172, -1796.7447509766, 13.417814254761, 180},
        {1273.5496826172, -1796.7447509766, 13.417814254761, 180},
        {1278.5496826172, -1796.7447509766, 13.417814254761, 180},
        {1262.5496826172, -1809.7447509766, 13.417814254761, 180},
        {1268.5496826172, -1809.7447509766, 13.417814254761, 180},
        {1273.5496826172, -1809.7447509766, 13.417814254761, 180},
        {1278.5496826172, -1809.7447509766, 13.417814254761, 180},
        {1262.5496826172, -1822.7447509766, 13.417814254761, 180},
        {1268.5496826172, -1822.7447509766, 13.417814254761, 180},
        {1273.5496826172, -1822.7447509766, 13.417814254761, 180},
        {1278.5496826172, -1822.7447509766, 13.417814254761, 180},
    },

    [3] = {
        {1670.4813232422, -1609.1826171875, 13.546875, 3},
        {1663.5046386719, -1609.2149658203, 13.546875, 3},
        {1656.4074707031, -1609.2064208984, 13.542793273926, 3},
    },

    [4] = {
        {214.92097473145,-1918.7790527344,-0.5989933013916, 180},
        {258.14801025391,-1921.833984375,-0.54103636741638, 180},
        {316.61206054688,-1926.0213623047,-0.54657971858978, 180},
        {289.6813659668,-1934.7126464844,-0.55764478445053, 180},
    },

    [5] = {
        {1960.7062988281, -2226.1416015625, 14.592664718628, 180},
       -- {1841.7514648438,-2412.01953125,13.5546875, 180},
      --  {1986.8690185547,-2383.1110839844,13.546875, 90},
        --{1987.2873535156,-2313.9978027344,13.546875, 90},
    },
}

vehicles = {
    --{név,modell,ár,limit(false <= nincs limit),végsebesség,üzemanyag típusa, üzemanyag tartáj kapacitása, meghajtás, csomagtartó kapacitás, ajtók száma, gyártási év,gyorsulas,irányíthatóság,féktávolság}, haszonjármű

    [1] = { -- Civil carshop
        --{
           -- category_name = "AMC",
           -- category_cars = {
                --{"", 565, 12000, false, 109, "", _, "Hátsó kerék", _, 3, 1974, 1000},
           -- },
      --  },

        {
            category_name = "Audi",
            category_cars = {
                {"", 426, 230000, 30, 177, "", _, "Hátsó kerék", _, 5, 2014, 9000},
                {"", 551, 75000, false, 177, "", _, "Hátsó kerék", _, 5, 2014, 6000},
                {"", 527, 125000, 50, 148, "", _, "Össz. kerék", _, 3, 1983, 7000},
                {"", 529, 350000, 25, 148, "", _, "Össz. kerék", _, 5, 2016, 12000},
                {"", 585, 1000000, 10, 148, "", _, "Össz. kerék", _, 5, 2022, 20000},
            },
        },

        {
            category_name = "BMW",
            category_cars = {
                {"", 405, 100000, 50, 202, "", _, "Hátsó kerék", _, 5, 1987, 6000},
                {"", 445,--[[ID]] 200000--[[ár]], 65,--[[limit]] 226,--[[végsebesség]] "", _, "Hátsó kerék", _, 5, 2005, 9000},
                {"", 492, 225000, 45, 177, "", _, "Hátsó kerék", _, 5, 2016, 10000},
                {"", 404, 280000, 55, 154, "", _, "Hátsó kerék", _, 5, 2018, 12000},
                {"", 549, 110000, 20, 154, "", _, "Hátsó kerék", _, 5, 2018, 6000},
            },
        },

        {
            category_name = "Bugatti",
            category_cars = {
                {"", 502, 2500000, 7, 373, "", _, "Hátsó kerék", _, 3, 2010, 20000},
            },
        },

        {
            category_name = "Chevrolet",
            category_cars = {
                
                {"", 422, 65000, false, 177, "", _, "Hátsó kerék", _, 3, 1965, 2500, 4},
                {"", 478, 80000, 40, 177, "", _, "Hátsó kerék", _, 3, 2015, 5000},
                {"", 589, 1000000, 20, 217, "", _, "Hátsó kerék", _, 3, 2017, 14000}, 
            },
        },

        {
            category_name = "Chrysler",
            category_cars = {
                {"", 467, 18000, false, 202, "", _, "Összkerék", _, 5, 1970, 3000},
                {"", 466, 150000, false, 202, "", _, "Hátsó kerék", _, 5, 2012, 5000},
            },
        },

        {
            category_name = "Dodge",
            category_cars = {
                {"", 402, 700000, 25, 256, "", _, "Hátsó kerék", _, 3, 2018, 12000},
                {"", 540, 350000, 30, 177, "", _, "Hátsó kerék", _, 5, 2014, 7000},
                {"", 536, 73200, 100, 177, "", _, "Hátsó kerék", _, 3, 1970, 5000},
                {"", 543, 125000, 20, 177, "", _, "Hátsó kerék", _, 3, 2010, 6500},
            },
        },

        
        {
            category_name = "Ferrari",
            category_cars = {
                {"", 541, 2300000, 5, 352, "", _, "Hátsó kerék", _, 3, 2010, 17500},
            },
        },

        {
            category_name = "Ford",
            category_cars = {
                {"", 565, 120000, 30, 109, "", _, "Hátsó kerék", _, 3, 2015, 6500},
                {"", 526, 350000, 30, 177, "", _, "Hátsó kerék", _, 3, 2013, 9000},
                {"", 534, 290000, 20, 177, "", _, "Hátsó kerék", _, 3, 1990, 7000},
                {"", 494, 250000, 20, 177, "", _, "Hátsó kerék", _, 3, 2016, 9500},
            },
        },

        --{
          --  category_name = "GMC",
          --  category_cars = {
          --      {"", 529, 60000, false, 170, "", _, "Hátsó kerék", _, 5, 2009, 2000},
          --  },
        --},

        {
            category_name = "Grumman",
            category_cars = {
                {"", 498, 110000, false, 140, "", _, "Hátsó kerék", _, 5, 1994, 2000},
            },
        },

        {
            category_name = "Harley-Davidson",
            category_cars = {
                {"", 586, 65000, 30, 177, "", _, "Hátsó kerék", _, 0, 1999, 2500},
                {"", 463, 50000, 30, 177, "", _, "Hátsó kerék", _, 0, 1983, 1500},
            },
        },

        {
            category_name = "Honda",
            category_cars = {
                {"", 421, 170000, 30, 177, "", _, "Hátsó kerék", _, 0, 2018, 8000},
            },
        },

        {
            category_name = "Jeep",
            category_cars = {
                {"", 579, 230000, 40, 185, "", _, "Hátsó kerék", _, 5, 2012, 8000},
                {"", 505, 60000, false, 185, "", _, "Hátsó kerék", _, 5, 2010, 4000},
            },
        },

        {
            category_name = "Kawasaki",
            category_cars = {
                {"", 521, 70000, 50, 177, "", _, "Hátsó kerék", _, 0, 2019, 3000},        
            },
        },

      

        {
            category_name = "Lamborghini",
            category_cars = {
                {"", 506, 2300000, 5, 202, "", _, "Összkerék", _, 5, 2015, 17500},
                {"", 550, 2000000, 5, 202, "", _, "Összkerék", _, 5, 2015, 16000},
            },
        },

        {
            category_name = "Land Rover",
            category_cars = {
                {"", 400, 280000, 35, 202, "", _, "Összkerék", _, 5, 2013, 9000},
            },
        },

        {
            category_name = "Mazda",
            category_cars = {
                {"", 410, 125000, 50, 202, "", _, "Összkerék", _, 5, 2008, 7000},
            },
        },
        --{név,modell,ár,limit(false <= nincs limit),végsebesség,üzemanyag típusa, üzemanyag tartáj kapacitása, meghajtás, csomagtartó kapacitás, ajtók száma, gyártási év,gyorsulas,irányíthatóság,féktávolság}
        {
            category_name = "McLaren",
            category_cars = {
                {"", 415, 2200000, 7, 384, "", _, "Összkerék", _, 3, 2014, 17500},
            },
        },

        {
            category_name = "Mercedes-Benz",
            category_cars = {
                {"", 516, 350000, 30, 177, "", _, "Hátsó kerék", _, 5, 2004, 9500},
                {"", 507, 75000, false, 178, "", _, "Hátsó kerék", _, 5, 1993, 5000},
                {"", 458, 90000, 50, 178, "", _, "Hátsó kerék", _, 5, 2015, 6000},
                {"", 479, 85000, 70, 175, "", _, "Hátsó kerék", _, 5, 2012, 5500},
                {"", 442, 850000, 15, 177, "", _, "Hátsó kerék", _, 5, 2014, 13000},
                {"", 566, 1350000, 5, 177, "", _, "Hátsó kerék", _, 5, 2018, 15500},
            },
        },

        {
            category_name = "Nissan",
            category_cars = {
                {"", 602, 400000, 25, 246, "", _, "Hátsó kerék", _, 3, 2007, 15000},
                {"", 562, 270000, 30, 177, "", _, "Hátsó kerék", _, 3, 2014, 9000},
            },
        },

        
       -- {
           -- category_name = "Pontiac",
           -- category_cars = {
             --   {"", 542, 142000, 35, 196, "", _, "Hátsó kerék", _, 3, 1967, 6500},
           -- },
      --  },

        {
            category_name = "Porsche",
            category_cars = {
                {"", 480, 1000000, 7, 293, "", _, "Hátsó kerék", _, 3, 2006, 16000},
            },
        },

        {
            category_name = "Subaru",
            category_cars = {
                {"", 560, 145000, 45, 177, "", _, "Hátsó kerék", _, 5, 2004, 10000},
            },
        },

        {
            category_name = "Tesla",
            category_cars = {
                {"", 546, 350000, 35, 234, "", _, "Hátsó kerék", _, 5, 2015, 11000},
                {"", 496, 2200000, 10, 377, "", _, "Hátsó kerék", _, 3, 2020, 17000}, 
            },
        },

        {
            category_name = "Toyota",
            category_cars = {
                {"", 559, 145000, 50, 177, "", _, "Hátsó kerék", _, 3, 2006, 8500},
            },
        },

        {
            category_name = "Volkswagen",
            category_cars = {
                {"", 518, 145000, 30, 177, "", _, "Hátsó kerék", _, 3, 2012, 7500},
            },
        },

        {
            category_name = "Egyéb járművek",
            category_cars = {
                {"", 483, 70000, 30, 122, "", _, "Hátsó kerék", _, 5, 1970, 1500},
                {"", 468, 45000, 100, 177, "", _, "Hátsó kerék", _, 0, 2000, 2000},   
            },
        },

        {
            category_name = "Prémium járművek",
            category_cars = {
                {"", 451, 0, false, 250, "", _, "Hátsó kerék", _, 5, 1992, 25000}, 
                {"", 409, 0, false, 177, "", _, "Hátsó kerék", _, 5, 2010, 15000}, 
                {"", 411, 0, false, 384, "", _, "Összkerék", _, 3, 2016, 25000},  
                {"", 429, 0, false, 384, "", _, "Összkerék", _, 3, 2016, 25000}, 
                {"", 525, 0, false, 384, "", _, "Összkerék", _, 3, 2016, 15000},  
            },
        },

    },

    [2] = { -- Faction carshop
        {
            category_name = "Összes jármű",
            category_cars = {
                --{"", 598, 100000, false, 258, "", _, "Hátsó kerék", _, 5, 2007, 0, 0.85, 0.73, allowedFactions = {1}},
                -- PD - ID: 1
                {"", 596, 120000, false, 258, "", _, "Hátsó kerék", _, 5, 2015, 0, allowedFactions = {1}, pj = 2},
                {"", 598, 100000, false, 258, "", _, "Hátsó kerék", _, 5, 2014, 0, allowedFactions = {1, 70}},
                {"", 599, 100000, false, 258, "", _, "Hátsó kerék", _, 5, 2007, 0, allowedFactions = {1}},
                {"", 597, 105000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1}},

                {"", 490, 100000, false, 258, "", _, "Hátsó kerék", _, 5, 2012, 0, allowedFactions = {1}},
                {"", 416, 180000, false, 258, "", _, "Hátsó kerék", _, 5, 2013, 0, allowedFactions = {1}, pj = 1},
                -- OMSZ - ID: 19
                {"", 416, 180000, false, 258, "", _, "Hátsó kerék", _, 5, 2013, 0, allowedFactions = {19}, pj = 0},
                {"", 596, 120000, false, 258, "", _, "Hátsó kerék", _, 5, 2015, 0, allowedFactions = {19}, pj = 0},
                {"", 597, 105000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {19}, pj = 1},
                -- Szerelő ID: 3
                {"", 525, 300000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1, 70}},
                {"", 525, 300000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {3}, pj = 2},

                -- NAV ID: 70
                {"", 597, 105000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {70}, pj = 2},
                {"", 416, 180000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {70}, pj = 2},


                -- CIVIL PD
                {"", 492, 220000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1, 70}},
                {"", 579, 230000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1, 70}},
                {"", 507, 75000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1, 70}},


                -- Sörmaffia ID: 55, Teenager Homeboys ID: 59, Ganton Gangsters ID: 56, Maxikói frakció ID: 61, LC MOB: 64
                {"", 400, 200000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {55, 56, 59, 64, 67}},
                {"", 445, 200000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1, 55, 56, 59, 61, 64, 67, 70}},
                {"", 442, 700000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {55, 56, 59, 61, 64, 67}},
                {"", 516, 400000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {61, 64, 67}},
                {"", 426, 200000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {1, 61, 64, 67, 70}},
                {"", 546, 550000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {61, 64, 67}},
                {"", 404, 220000, false, 258, "", _, "Hátsó kerék", _, 5, 2010, 0, allowedFactions = {61, 64, 67}},
            },
        },
    },

    [3] = { -- Kerékpár kereskedés
        {
            category_name = "Kerékpárok",
            category_cars = {
                {"", 509, 250, false, 25, "", 0, "", 0, "Nincs", 2020, 1000},
                {"", 481, 350, false, 25, "", 0, "", 0, "Nincs", 2020, 1000},
                {"", 510, 450, false, 25, "", 0, "", 0, "Nincs", 2020, 1000},
            },
        },
    },

    [4] = { --Hajó bolt
        {
            category_name = "Hajók",
            category_cars = {
                {"", 454, 1250000, 5, 25, "", 0, "", 0, 0, 2014, 11500},
                {"", 473, 100000, 100, 100, "", 0, "", 0, 0, 2020, 2000},
                {"", 453, 50000, false, 100, "", 0, "", 0, 0, 2003, 3000},
                {"", 493, 800000, 10, 25, "", 0, "", 0, 0, 2014, 9500},
            },
        },
    },

    [5] = { --Helikopter bolt
        {
            category_name = "Helikopterek",
            category_cars = {
                {"", 487, 1525000, 20, 200, "", 0, "", 0, 5, 2020, 15000},
                {"", 469, 1800000, 5, 200, "", 0, "", 0, 0, 2018, 17000},
            },
        },
    },
    
}

faction_vehicles = {
    {},
}

function createAllVehicleTable()
    local deliveryVehicles = {
        category_name = "Áruszállításra alkalmas járművek",
        category_cars = {},
    }

    for k, v in ipairs(vehicles[1]) do
        for k2, v2 in ipairs(v.category_cars) do 
            if v2[13] then
                table.insert(deliveryVehicles.category_cars, v2)
            end
        end 
    end

    table.insert(vehicles[1], 1, deliveryVehicles)

    local allVehicles = {
        category_name = "Összes jármű",
        category_cars = {},
    }

    for k, v in ipairs(vehicles[1]) do
        if not (v.category_name == "Áruszállításra alkalmas járművek") then
            for k2, v2 in ipairs(v.category_cars) do 
                table.insert(allVehicles.category_cars, v2)
            end 
        end
    end

    table.insert(vehicles[1], 1, allVehicles)

end
createAllVehicleTable()

vehicle_default_colors = {
    {255,255,255},
    {0,0,0},
    {201, 67, 62},
    {66, 176, 60},
    {69, 175, 214},
    {23, 74, 163},
    {201, 131, 50},
    {179, 68, 156},
}

vehicleDataPoints = {"Végsebesség", "Üzemanyag típusa", "Üzemanyag tartály kapacitása", "Meghajtás", "Csomagtartó kapacitása", "Ajtók száma", "Gyártási év", "Áruszállítás"}
vehicleDataLineNames = {"Gyorsulás", "Irányíthatóság", "Fékezés"}

borderWalls = {
    {1164.7900390625, -1777.5139160156, 14.5, 0},
    {1164.7900390625, -1768.5139160156, 14.5, 0},
    {1164.7900390625, -1759.5139160156, 14.5, 0},
    {1164.7900390625, -1750.5139160156, 14.5, 0},
    {1164.7900390625, -1741.5139160156, 14.5, 0},
    {1164.7900390625, -1732.5139160156, 14.5, 0},
    {1164.7900390625, -1723.5139160156, 14.5, 0},
    {1164.7900390625, -1714.5139160156, 14.5, 0},
    {1164.7900390625, -1705.5139160156, 14.5, 0},
    {1164.7900390625, -1705.5139160156, 14.5, 0},

    {1164.7900390625, -1565.5139160156, 14.5, 0},
    {1164.7900390625, -1574.5139160156, 14.5, 0},
    {1164.7900390625, -1583.5139160156, 14.5, 0},

    {1042.6083984375, -1560.6728515625, 14.5, 90},
    {1033.6083984375, -1560.6728515625, 14.5, 90},
    {1024.6083984375, -1560.6728515625, 14.5, 90},
    {1015.6083984375, -1560.6728515625, 14.5, 90},

    {1128.3807373047, -1561.8732910156, 14.5, 90},

    {1010.7900390625, -1565.5139160156, 14.5, 0},
    {1010.7900390625, -1574.5139160156, 14.5, 0},
    {1010.7900390625, -1583.5139160156, 14.5, 0},

    {1030.2021484375, -1773.6691894531, 14.5, 45},
    {1040.2021484375, -1784.6691894531, 14.5, 45},
    {1035.3695068359, -1779.4095458984, 14.5, 45},
    {1046.5555419922, -1791.3309326172, 14.5, 45},
    {1053.4653320313, -1799.0289306641, 14.5, 45},
    {1061.2808837891, -1806.4425048828, 14.5, 45},
    {1068.1418457031, -1813.8162841797, 14.5, 45},
    {1075.5808105469, -1821.6872558594, 14.5, 45},
    {1082.5135498047, -1828.2896728516, 14.5, 45},

    {1087.1958007813, -1821.1981201172, 17.5, 90},
}

shortCityNames = {
    ["Las Venturas"] = "lv",
    ["Los Santos"] = "ls",
    ["San Fierro"] = "sf",
}

font = exports.oFont
core = exports.oCore
color, r, g, b = core:getServerColor()
interface = exports.oInterface
blur = exports.oBlur
vehicle = exports.oVehicle
infobox = exports.oInfobox
inventory = exports.oInventory

greenR, greenG, greenB = 135, 186, 93
blueR, blueG, blueB = 93, 138, 186
redR, redG, redB = 194, 103, 97

function comma_value(amount)
    local formatted = amount
    while true do  
      formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1.%2')
      if (k==0) then
        break
      end
    end
    return formatted
end


function tableContains (tab, val)
    for index, value in ipairs(tab) do
        if value == val then
            return true
        end
    end

    return false
end

function getVehiclePriceInCarshop(modelID, carshopType)
    if not carshopType then carshopType = 1 end 

    for k, v in pairs(vehicles[carshopType][1].category_cars) do 
        if v[2] == modelID then 
            return v[3]
        end
    end

    return false
end