# Configuration

{% hint style="success" %}
`shared/config.lua` is the **only** file your customers need to edit. All other files are locked.
{% endhint %}

***

### General

```lua
Config.Debug     = false
Config.KeySystem = 'qbx_vehiclekeys'
```

| Option      | Description                                                                              |
| ----------- | ---------------------------------------------------------------------------------------- |
| `Debug`     | Shows debug zones in-game while setting up coordinates                                   |
| `KeySystem` | `qbx_vehiclekeys` · `qb-vehiclekeys` · `Renewed-Vehiclekeys` · `qs-vehiclekeys` · `none` |

***

### Orders

```lua
Config.Order = {
    WaitTime            = 1,    -- Order wait time in minutes
    MaxVehicles         = 5,    -- Max vehicles per order
    MaxDeliverySpots    = 5,    -- Max delivery spots
    MaxDiscount         = 30,   -- Max discount percentage %
    MinProfit           = 10,   -- Min profit margin when displaying a vehicle %
    MaxProfit           = 30,   -- Max profit margin when displaying a vehicle %
    DefaultVehicleColor = 0,    -- Default vehicle color (0 = white)
}
```

***

### Test Drive

```lua
Config.TestDrive = {
    Enabled  = true,
    Duration = 300,   -- Duration in seconds (300 = 5 minutes)
}
```

***

### Flatbed Rental

```lua
Config.FlatbedRental = {
    Enabled     = true,
    RentPrice   = 1500,
    ReturnBonus = 500,
    Model       = 'flatbed',
    NPCModel    = 's_m_y_dockwork_01',

    Locations = {
        [1] = {
            label         = 'PDM Rental',
            coords        = vector4(...),   -- NPC location
            spawn         = vector4(...),   -- Flatbed spawn location
            return_radius = 10.0,
        },
    },
}
```

***

### Boss Menu (Renewed-Banking)

```lua
Config.BossMenu = {
    Enabled         = true,
    WithdrawEnabled = true,
    DepositEnabled  = true,
    MinTransaction  = 100,
    MaxTransaction  = 1000000,

    Societies = {
        ['cardealer'] = 'cardealer',  -- must match society name in Renewed-Banking
    },
}
```

{% hint style="warning" %}
Requires [Renewed-Banking](https://github.com/Renewed-Scripts/Renewed-Banking) to be installed.
{% endhint %}

***

### Dealers

```lua
Config.Dealers = {
    ['cardealer'] = {
        label = 'Premium Deluxe Motorsport',
        logo  = 'pdm_logo.png',
        job   = 'cardealer',

        tablet       = { coords = vector3(...), heading = 0.0 },
        storage      = { coords = vector4(...) },
        displaySpots = { [1] = vector4(...) },
        deliverySpot  = vector4(...),
        deliverySpots = { [1] = vector4(...) },

        shop       = 'pdm',
        categories = { 'super', 'sports', ... },

        -- Finance menu location
        bossMenu = {
            coords   = vector3(...),
            minGrade = 2,           -- minimum job grade to access
        },

        -- Vehicles with limited quantity
        limitedStock = {
            ['zentorno'] = 2,
        },

        -- Special badges and discounts
        specialOffers = {
            ['adder'] = {
                exclusive   = true,         -- gold "Exclusive" badge
                discount    = 15,           -- discount %
                limitedTime = true,
                startDate   = '2025-01-01',
                endDate     = '2027-12-31',
                isNew       = true,         -- green "New" badge
                newUntil    = '2027-12-31', -- nil = always new
                label       = 'Special Offer',
            },
        },
    },
}
```

***

### Categories

```lua
Config.Categories = {
    ['super'] = {
        label       = 'Super',
        limited     = true,    -- limited stock management
        maxPerOrder = 2,       -- max per order
        cooldown    = 24,      -- hours between orders
    },
}
```

**Available:** `super` · `sports` · `sportsclassics` · `muscle` · `sedans` · `coupes` · `compacts` · `suvs` · `offroad` · `vans` · `motorcycles` · `emergency`

***

### Restricted Jobs

```lua
Config.RestrictedJobs = {
    ['police']    = { label = 'Police',   color = '#3b82f6' },
    ['ambulance'] = { label = 'EMS',      color = '#ef4444' },
    ['mechanic']  = { label = 'Mechanic', color = '#f59e0b' },
}
```

When a vehicle is restricted to a job in the showroom, only players with that job can purchase or test drive it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://x8project.gitbook.io/x8project/projects/cardealership/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
