⚙️Configuration

Configuration guide of Used Vehicle Shop System.


Config.lua

Config = {}

Config.Language = 'en' -- en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh, he, fi
Config.TargetSystem = 'auto' -- auto, ox-target or qb-target

-- Prevent players from driving their listed vehicles. Does not affect test drives or display vehicles.
Config.PreventListedVehicleUsage = true

-- Blocked vehicle classes (cannot be listed for sale)
Config.BlockedClasses = {
    -- [0] = true,   -- Compacts
    -- [1] = true,   -- Sedans
    -- [2] = true,   -- SUVs
    -- [3] = true,   -- Coupes
    -- [4] = true,   -- Muscle
    -- [5] = true,   -- Sports Classics
    -- [6] = true,   -- Sports
    -- [7] = true,   -- Super
    -- [8] = true,   -- Motorcycles
    -- [9] = true,   -- Off-road
    -- [10] = true,  -- Industrial
    -- [11] = true,  -- Utility
    -- [12] = true,  -- Vans
    -- [13] = true,  -- Cycles
    [14] = true,  -- Boats
    [15] = true,  -- Helicopters
    [16] = true,  -- Planes
    [17] = true,  -- Service
    [18] = true,  -- Emergency
    [19] = true,  -- Military
    [20] = true,  -- Commercial
    [21] = true,  -- Trains
}

-- NPC Settings
Config.NPC = {
    model = 'a_m_y_business_02',
    coords = vector4(-40.85, -1674.76, 29.47, 139.38),
    scenario = 'WORLD_HUMAN_CLIPBOARD',
    blip = {
        enabled = true,
        sprite = 326,
        color = 2,
        scale = 0.7,
        label = 'Used Vehicle Shop'
    }
}

-- NPC Camera
Config.NPCCamera = {
    enabled = true,
    fov = 80.0,
    distance = 0.58,
    height = 0.04,
    freeze = false,
    shake = 0.03
}

-- Vehicle display parking spots
Config.VehicleSpots = {
    vector4(-61.32, -1687.74, 29.49, 314.71),
    vector4(-57.82, -1690.45, 29.49, 313.89),
    vector4(-55.67, -1693.2, 29.49, 316.07),
    vector4(-53.51, -1695.11, 29.49, 312.98),
    vector4(-57.45, -1683.15, 29.49, 315.41),
    vector4(-56.02, -1684.92, 29.49, 315.63),
    vector4(-53.87, -1686.85, 29.49, 322.27),
    vector4(-51.69, -1688.79, 29.49, 319.17),
    vector4(-49.7, -1690.67, 29.45, 319.27),
    vector4(-47.88, -1692.62, 29.46, 309.24),
}

-- Test Drive
Config.TestDrive = {
    duration = 60,
    spawnCoords = vector4(-951.8708, -3362.1538, 13.4812, 58.330),
    returnCoords = vector3(-46.69, -1679.78, 29.38),
}

-- Distance Settings
Config.InfoPopupDistance = 6.0
Config.InteractDistance = 3.5

-- Functions
Config.Functions = {
    ["helpNotify"] = function(message, icon)
        lib.showTextUI(message, {
            position = "right-center",
            icon = icon,
        })
    end,

    ["hideHelpNotify"] = function()
        lib.hideTextUI()
    end,

    ["notify"] = function(message, type)
        lib.notify({
            description = message,
            type = type,
            duration = 5000,
        })
    end,

    ["serverNotify"] = function(src, message, type)
        TriggerClientEvent('ox_lib:notify', src, {
            description = message,
            type = type,
            duration = 5000,
        })
    end,

    ["setFuel"] = function(vehicle)
        if not DoesEntityExist(vehicle) then return end
        if GetResourceState('ox_fuel') == 'started' then
            Entity(vehicle).state.fuel = 100
            return
        end
        if GetResourceState('LegacyFuel') == 'started' then
            exports['LegacyFuel']:SetFuel(vehicle, 100)
            return
        end
        if GetResourceState('cdn-fuel') == 'started' then
            exports['cdn-fuel']:SetFuel(vehicle, 100)
            return
        end
        if GetResourceState('ps-fuel') == 'started' then
            exports['ps-fuel']:SetFuel(vehicle, 100)
            return
        end
        SetVehicleFuelLevel(vehicle, 100.0)
        DecorSetFloat(vehicle, '_FUEL_LEVEL', 100.0)
    end
}

Last updated