# config.lua

```lua
config                                              = tgiCoreExports:getConfig()
config.lang                                         = "en"

config.adminCommands                                = {
    garagedev = {
        active = true,
        command = "garagedev",    -- command name to open garage admin menu
        esx = "admin",            -- Admin permission for ESX
        qb = "god"                -- Admin permission for QB
    },
    claimVehicle = {              -- This command assigns the vehicle the player is currently in as their own.
        active = true,
        command = "claimVehicle", -- command name to save vehicle
        esx = "admin",            -- Admin permission for ESX
        qb = "god"                -- Admin permission for QB
    },
}

config.commands                                     = {
    extra = {                             -- This command allows you to toggle the extras of the vehicle you are currently in.
        active = true,
        command = "extra",                -- command name to open vehicle extra and livery menu
        jobs = { "police", "ambulance" }, -- jobs that can use this command
        vehicleClass = { 18 }
    },
}

config.showImpoundedVehiclesOnGarageMenu            = true -- Set true if you want to show impounded vehicles in the garage menu (if the vehicle is not in any garage, it will be shown as impounded)

-- Default parking price
config.parkPrice                                    = {
    type = "bank",
    amount = 50 -- Parking Price
}

config.locale                                       = {
    timeLocale = "en-EN",
    moneyLocale = "en-EN",
    moneyCurrency = "USD",
}

config.platePatern                                  = "11AAA111" -- 1 will lead to a random number from 0-9 | A will lead to a random letter from A-Z (ex: 11AAA111 - 1AA111AA)
config.spawnDistance                                = 50         -- Spawn distance of the parked cars if you have garage real parking true

config.canSpawnVehicleFromOtherGarage               = true       -- Set true if you want player to pay to bring their cars from another parked garage.
config.spawnVehicleFromOtherGaragePrice             = 500        -- Price to bring cars from another garage to another
config.spawnVehicleFromOtherGaragePriceForJobGarage = 10         -- Price to bring cars from another garage to another for job garages

config.impound                                      = {
    setFuel = {
        active = true,          -- set true if you want the fuel to be changed after the car is towed, you can change the value below
        value = 20              -- Fuel value after car towed
    },
    repairVehicle = true,       -- Set true if you want the car to be repaired after taking from impound
    canSpawnOutside = false,    -- set true if you want to let players take the car from impound even if the car is not towed and somewhere outside (if its true the car thats somewhere outside will be deleted so the cars are not dublicated)
    minutePerMoney = 30,        -- The Price per minute that players have to pay, if they want to take their car that has been towed by the police, before their fine has ended
    policeCommand = "impound",  -- Open Police menu command
    activeNormalImpound = true, -- set true if you want the police also to tow cars without any fine
    activeCustomImpound = true, -- set true if you want the police to add custom fines to tow cars
    deleteVehicle = true,       -- set true if you want the cars that have been fined by the police and are NOT in any garage to be deleted (If deleted, The players need to take their cars from impound)
    money = {                   -- The Price to take the vehicles from impound (If there is any fines, the fine price will be added to this price)
        car  = {
            normal = 10000,     -- If vehicle has no insurance
            insurance = 100,    -- If vehicle has insurance
        },
        air  = {
            normal = 30000,   -- If vehicle  has no insurance
            insurance = 1000, -- If vehicle has insurance
        },
        boat = {
            normal = 15000,  -- If vehicle has no  insurance
            insurance = 250, -- If vehicle has insurance
        },
    }
}

config.company                                      = {
    active = true,          -- Set true if you want player to rent garages
    rentPeriodDay = 30,     -- Period in days that the players can rent garages
    rentPayBeforeDay = 7,   -- Period in days that the player can renew his rent before it ends
    rentMoneyPercent = 0.5, -- The value is multiplied by the garage FIRST rent price to determine the rental fee (for example if you rented the garage for the first time and paid 1.000 $, after 15 days you'll need to pay (1.000 x 0.1 = 100) 100$ so your rent renews)
    earnMoneySpawnFromOtherGarageMoney = {
        active = true,      -- Set true if you want the garage owner to get the price that players pay if they want to bring their car from another garage (will only work if config.canSpawnVehicleFromOtherGarage = true)
        percent = 0.5,      -- The percentage that garage owner will get. (config.spawnVehicleFromOtherGaragePrice or config.spawnVehicleFromOtherGaragePriceForJobGarage will be multiplied with the percentage (example: 500 * 0.5 = 250 $)
    },
    parkPricePercent = 0.9, --  The percentage that garage owner will get (config.parkPrice amount will be multiplied with the percentage (example: 10 * 1.0 = 10 $ or [garage.json][garagekey].parkPrice * 0.5)
}

-- Draw interact menu distance (Max: 10)
config.distGarageType                               = {
    normal = { -- when realparking is disabled in the garage
        car = 2.3,
        air = 4,
        boat = 4,
    },
    realParking = { -- when realparking is active in the garage
        car = 1.3,
        air = 4,
        boat = 4,
    },
    realParkingVeh = { -- for vehicles spawned in garages with realparking enabled
        car = 1.8,
        air = 4,
        boat = 4,
    },
    ownerPanel = 5.0 -- distance to open the owner panel
}

config.vehicleClassToScriptType                     = {
    [0] = "car",   -- Compacts
    [1] = "car",   -- Sedans
    [2] = "car",   -- SUVs
    [3] = "car",   -- Coupes
    [4] = "car",   -- Muscle
    [5] = "car",   -- Sports Classics
    [6] = "car",   -- Sports
    [7] = "car",   -- Super
    [8] = "car",   -- Motorcycles
    [9] = "car",   -- Off-road
    [10] = "car",  -- Industrial
    [11] = "car",  -- Utility
    [12] = "car",  -- Vans
    [13] = "car",  -- Cycles
    [14] = "boat", -- Boats
    [15] = "air",  -- Helicopters
    [16] = "air",  -- Planes
    [17] = "car",  -- Service
    [18] = "car",  -- Emergency
    [19] = "car",  -- Military
    [20] = "car",  -- Commercial
    [21] = "car",  -- Trains
    [22] = "car",  -- Open Wheel
}

config.vehicleCoveredModel                          = {
    [0] = `imp_prop_covered_vehicle_04a`,  -- Compacts
    [1] = `imp_prop_covered_vehicle_04a`,  -- Sedans
    [2] = `imp_prop_covered_vehicle_07a`,  -- SUVs
    [3] = `imp_prop_covered_vehicle_04a`,  -- Coupes
    [4] = `imp_prop_covered_vehicle_03a`,  -- Muscle
    [5] = `prop_jb700_covered`,            -- Sports Classics
    [6] = `imp_prop_covered_vehicle_01a`,  -- Sports
    [7] = `prop_cheetah_covered`,          -- Super
    [8] = `imp_prop_covered_vehicle_04a`,  -- Motorcycles
    [9] = `imp_prop_covered_vehicle_04a`,  -- Off-road
    [10] = `imp_prop_covered_vehicle_04a`, -- Industrial
    [11] = `imp_prop_covered_vehicle_04a`, -- Utility
    [12] = `imp_prop_covered_vehicle_04a`, -- Vans
    [13] = nil,                            -- Cycles
    [14] = nil,                            -- Boats
    [15] = nil,                            -- Helicopters
    [16] = nil,                            -- Planes
    [17] = `imp_prop_covered_vehicle_04a`, -- Service
    [18] = `imp_prop_covered_vehicle_04a`, -- Emergency
    [19] = `imp_prop_covered_vehicle_04a`, -- Military
    [20] = `imp_prop_covered_vehicle_04a`, -- Commercial
    [21] = nil,                            -- Trains
    [22] = `imp_prop_covered_vehicle_04a`, -- Open Wheel
}

--DONT CHANGE
config.langs                                        = {}
local file1                                         = LoadResourceFile(GetCurrentResourceName(), "jobcars.json")
local file2                                         = LoadResourceFile(GetCurrentResourceName(), "garages.json")
config.garageJobCarsList                            = file1 and json.decode(file1) or {}
if file2 then
    config.garageList = json.decode(file2)
    local amount = 0
    local slots = 0
    for k, v in pairs(config.garageList) do
        amount = amount + 1
        if v.slots then slots = slots + #v.slots end
        if not v.slotsSpawn then config.garageList[k].slotsSpawn = {} end
        if v.playerOwnable then config.garageList[k].playerOwnable.coords = vector3(tonumber(v.playerOwnable.coords.x), tonumber(v.playerOwnable.coords.y), tonumber(v.playerOwnable.coords.z)) end
    end
    --print("GarageList amount: " .. amount)
    --print("GarageList slots: " .. slots)
end

```
