Configuration

All v42 scripts include clearly structured and editable files, featuring exports, client- and server-side functions, and configuration options. Designed to give developers full control and flexibility

View Configuration
Config = Config or {}

-- General Settings
Config.UseTarget = true     -- Enable or disable target interactions (recommended for ESX)
Config.Framework = 'qb'     -- Define framework: 'qb' for QBCore, 'esx' for ESX
Config.CoreName = 'qb-core' -- Name of the core resource (e.g., 'qb-core' for QBCore or 'es_extended' for ESX)
Config.Debug = false        -- Enable debugging (show errors/PolyZones)
Config.Language = 'en'      -- Language file to use, located in the 'language' folder

-- Vehicle Shops Configuration
Config.Shops = {

    -- Premium Deluxe Motorsport Shop Configuration
    ["pdm"] = {
        name = "Premium Deluxe Motorsport",                            -- Shop name displayed to players
        BoughtVehicleSpawn = vector4(-18.24, -1101.76, 26.95, 150.43), -- Spawn location for purchased vehicles
        TestDriveSpawn = vector4(-23.77, -1094.83, 27.31, 339.42),     -- Spawn location for test drive vehicles
        ShowRoomVehicles = true,                                       -- Enable display vehicles in showroom
        InteractWithCar = true,                                        -- Enable interaction with showroom cars to open the catalog
        ShowRoomPlate = 'PDM CARS',                                    -- License plate text for showroom vehicles
        GiveTestDriveVehicleKeys = true,                               -- Give keys to players for test drive vehicles
        TestDriveTime = 10,                                            -- Duration (in seconds) of the test drive session

        -- Map blip configuration for the shop
        blip = {
            pos = vector3(-44.1, -1098.6, 27.27), -- Blip coordinates on the map
            sprite = 225,                         -- Blip icon type
            color = 3,                            -- Blip color
            scale = 0.48,                         -- Blip size
            showBlip = true                       -- Toggle visibility of the blip
        },

        -- Interaction zones within the shop
        interactZones = {
            { pos = vector4(-40.27, -1094.48, 27.27, 25.0) },
            { pos = vector4(-38.9, -1100.27, 27.27, 21.0) },
            { pos = vector4(-46.93, -1095.45, 27.27, 101.0) },
            { pos = vector4(-51.72, -1095.07, 27.27, 29.0) },
            { pos = vector4(-51.09, -1086.93, 27.27, 68.0) },
        },

        -- Vehicles displayed in the showroom with model and position
        showroomCars = {
            { model = 'adder',     pos = vector4(-47.29, -1092.13, 26.3, 250.18) },
            { model = 'voodoo',    pos = vector4(-54.76, -1096.98, 26.3, 289.04) },
            { model = 'zentorno',  pos = vector4(-49.93, -1083.61, 26.3, 157.91) },
            { model = 'dominator', pos = vector4(-37.04, -1093.1, 26.3, 113.48) },
            { model = 'hermes',    pos = vector4(-42.31, -1101.59, 26.3, 25.72) }
        },

        -- PolyZone configuration for defining the showroom area
        zone = {
            PolyZone = {
                vector2(-135.2248, -1137.1731),
                vector2(7.7812, -1187.5519),
                vector2(59.5835, -1072.5519),
                vector2(-72.7215, -995.3499)
            },
            MinZ = 20.1666, -- Minimum height for PolyZone
            MaxZ = 50.5139  -- Maximum height for PolyZone
        }
    },

    -- Luxury Auto Showroom Configuration ( Just a Demo )
    ["luxury"] = {
        name = "Luxury Auto Showroom",                                -- Shop name displayed to players
        BoughtVehicleSpawn = vector4(1362.78, -734.22, 67.21, 85.71), -- Spawn location for purchased vehicles
        TestDriveSpawn = vector4(1356.28, -730.93, 67.1, 102.18),     -- Spawn location for test drive vehicles
        ShowRoomVehicles = true,                                      -- Enable display vehicles in showroom
        InteractWithCar = true,                                       -- Enable interaction with showroom cars to open the catalog
        ShowRoomPlate = 'PDM CARS',                                   -- License plate text for showroom vehicles
        GiveTestDriveVehicleKeys = true,                              -- Give keys to players for test drive vehicles
        TestDriveTime = 10,                                           -- Duration (in seconds) of the test drive session

        -- Map blip configuration for the shop
        blip = {
            pos = vector3(1368.74, -737.16, 67.23), -- Blip coordinates on the map
            sprite = 225,                           -- Blip icon type
            color = 4,                              -- Blip color
            scale = 0.48,                           -- Blip size
            showBlip = true                         -- Toggle visibility of the blip
        },

        -- Interaction zones within the shop
        interactZones = {
            { pos = vector4(1361.0872, -742.7739, 67.0656, 201.9820) },
            { pos = vector4(-796.5, -229.2, 37.07, 90.0) },
            { pos = vector4(-790.6, -231.9, 37.07, 110.0) }
        },

        -- Vehicles displayed in the showroom with model and position
        showroomCars = {
            { model = 'entityxf', pos = vector4(1372.93, -739.25, 67.23, 81.83) },
            { model = 'cheetah',  pos = vector4(1362.31, -741.8, 67.14, 37.69) }
        },

        -- PolyZone configuration for defining the showroom area
        zone = {
            PolyZone = {
                vector2(1391.7443, -736.7486),
                vector2(1378.8037, -717.1653),
                vector2(1362.6776, -719.3195),
                vector2(1345.8888, -721.3128),
                vector2(1335.6, -734.5296),
                vector2(1331.6461, -751.4107),
                vector2(1344.2711, -761.2388),
                vector2(1359.0131, -770.5857),
                vector2(1370.8221, -775.1614),
                vector2(1384.5457, -768.5045),
                vector2(1398.5198, -761.5457)
            },
            MinZ = 0,  -- Minimum height for PolyZone
            MaxZ = 200 -- Maximum height for PolyZone
        }
    }
}

Last updated