# configuration

All settings live in `config.lua`. Nothing else needs to be edited for basic setup.

## Framework Detection

| Key                   | Default  | Description                                                                                    |
| --------------------- | -------- | ---------------------------------------------------------------------------------------------- |
| `Config.Framework`    | `"auto"` | Force a framework: `"qbcore"`, `"esx"`, `"ox"`, or `"auto"`                                    |
| `Config.TargetSystem` | `"auto"` | Force a target: `"qb-target"`, `"ox_target"`, `"qtarget"`, `"interact"`, `"none"`, or `"auto"` |
| `Config.NotifySystem` | `"auto"` | Force a notify system: `"qbcore"`, `"esx"`, `"ox_lib"`, `"mythic"`, `"custom"`, or `"auto"`    |

## General

| Key            | Default | Description                                      |
| -------------- | ------- | ------------------------------------------------ |
| `Config.Debug` | `false` | Print detection results to server/client console |

## Showroom Location

| Key                     | Default        | Description                                      |
| ----------------------- | -------------- | ------------------------------------------------ |
| `Config.ShowroomCoords` | `vector4(...)` | Where the showroom ped spawns (x, y, z, heading) |
| `Config.TestDriveSpawn` | `vector4(...)` | Where the test drive vehicle spawns              |

## Test Drive

| Key                           | Default | Description                                   |
| ----------------------------- | ------- | --------------------------------------------- |
| `Config.TestDriveDuration`    | `30000` | Duration in **milliseconds** (30000 = 30 s)   |
| `Config.EndTestDriveKey`      | `73`    | FiveM control index for ending early (73 = X) |
| `Config.EndTestDriveKeyLabel` | `"[X]"` | Label shown in the on-screen notification     |

## Ped

| Key                      | Default                 | Description                                     |
| ------------------------ | ----------------------- | ----------------------------------------------- |
| `Config.PedModel`        | `a_m_y_business_01`     | Any valid ped model hash                        |
| `Config.PedScenario`     | `WORLD_HUMAN_CLIPBOARD` | Idle animation scenario                         |
| `Config.PedInteractDist` | `2.5`                   | Distance (meters) to trigger target interaction |
| `Config.PedTargetLabel`  | `"VIP Car Showroom"`    | Label shown in the target prompt                |
| `Config.PedTargetIcon`   | `"fas fa-car"`          | FontAwesome icon for the target option          |
| `Config.PedZOffset`      | `-1.0`                  | Vertical spawn offset for ground alignment      |

## Proximity Fallback (when `TargetSystem = "none"`)

| Key                           | Default                  | Description                               |
| ----------------------------- | ------------------------ | ----------------------------------------- |
| `Config.ProximityKey`         | `38`                     | FiveM control index (38 = E)              |
| `Config.ProximityKeyLabel`    | `"[E]"`                  | Label shown above the marker              |
| `Config.ProximityDist`        | `2.5`                    | Distance to show key prompt               |
| `Config.ProximityDrawDist`    | `10.0`                   | Distance to start drawing marker and hint |
| `Config.ProximityMarker`      | `true`                   | Show a cylinder marker at the showroom    |
| `Config.ProximityMarkerType`  | `1`                      | GTA marker type integer                   |
| `Config.ProximityMarkerSize`  | `vector3(1.5, 1.5, 0.5)` | Marker dimensions                         |
| `Config.ProximityMarkerColor` | `{r,g,b,a}`              | RGBA color of the marker                  |

## Blip

| Key                   | Default              | Description                        |
| --------------------- | -------------------- | ---------------------------------- |
| `Config.Blip.Enabled` | `true`               | Show a map blip                    |
| `Config.Blip.Sprite`  | `326`                | Blip sprite (326 = car dealership) |
| `Config.Blip.Color`   | `27`                 | Blip color index (27 = purple)     |
| `Config.Blip.Scale`   | `0.8`                | Blip size                          |
| `Config.Blip.Label`   | `"VIP Car Showroom"` | Blip tooltip                       |

## Purchase & Logging

| Key                       | Default                     | Description                                     |
| ------------------------- | --------------------------- | ----------------------------------------------- |
| `Config.DiscordLink`      | `"discord.gg/..."`          | Shown in the purchase popup                     |
| `Config.DiscordTicketMsg` | `"Please open a ticket..."` | Notification text prefix                        |
| `Config.LogPurchases`     | `true`                      | Print purchase requests to the server console   |
| `Config.DiscordWebhook`   | `""`                        | Full webhook URL; leave empty to disable        |
| `Config.WebhookBotName`   | `"VIP Showroom"`            | Bot display name in Discord                     |
| `Config.WebhookColor`     | `9109759`                   | Embed sidebar color (decimal, default = purple) |

## Notification Messages

All notification strings are in `Config.Notify`. They support `%s` placeholders via `string.format`.

| Key               | Placeholders                     | Description                               |
| ----------------- | -------------------------------- | ----------------------------------------- |
| `testDriveStart`  | `%s` = seconds, `%s` = key label | Shown when test drive begins              |
| `testDriveEnd`    | —                                | Shown when test drive ends normally       |
| `testDriveExited` | —                                | Shown when player exits the vehicle early |
| `alreadyDriving`  | —                                | Guard: already in a test drive            |
| `invalidVehicle`  | —                                | Guard: vehicle index out of range         |
| `purchaseRequest` | `%s` = vehicle name              | Shown on purchase button press            |

## Adding Vehicles

Add entries to `Config.VipCars`. Each entry requires:

```lua
{
    name         = "Display Name",   -- shown in the car list
    model        = "spawncode",      -- vehicle spawn model string
    image        = "https://...",    -- preview image URL
    category     = "Super",          -- label in the list (free text)
    topSpeed     = 300,              -- shown in stats panel
    acceleration = 95,               -- 0–100
    handling     = 90,               -- 0–100
}
```


---

# 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://mohssins.gitbook.io/mohscriptsdocs/moh-vipshowroom/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.
