# Config

All configuration is located in `shared/config.lua`.

***

### Gameplay

```lua
Config.Gameplay = {
    Weapon           = `WEAPON_PAINTBALL`,  -- Default weapon (hash)
    MaxHitDistance    = 65.0,                -- Max distance to register a hit (units)
    HitCooldownMs    = 1200,                -- Cooldown between hits on the same target (ms)
    SpawnProtectionMs = 3000,               -- Spawn protection duration (ms)
    MaxTeamSize      = 6,                   -- Global max team size
}
```

| Parameter           | Type  | Description                                              |
| ------------------- | ----- | -------------------------------------------------------- |
| `Weapon`            | hash  | Default weapon hash used in matches                      |
| `MaxHitDistance`    | float | Maximum distance for a hit to be validated               |
| `HitCooldownMs`     | int   | Minimum time between two hits on the same target (in ms) |
| `SpawnProtectionMs` | int   | Duration of respawn protection (in ms)                   |
| `MaxTeamSize`       | int   | Max players per team (can be reduced per arena)          |

***

### Lobby Defaults

```lua
Config.Defaults = {
    arena     = "boardwalk",   -- Default arena
    mode      = "TEAM",        -- Game mode (TEAM, ELIM, FFA, GUNGAME)
    weapon    = "paintball",   -- Weapon (key from Config.Weapons)
    teamSize  = 3,             -- Players per team
    target    = 35,            -- Target score to win
    timeLimit = 600,           -- Max duration in seconds (10 min)
    nightMode = false,         -- Night mode
    hardcore  = false,         -- Hardcore mode
    friendly  = false,         -- Friendly fire enabled
    autoStart = true,          -- Auto-start when everyone is ready
}
```

***

### Available Weapons

```lua
Config.Weapons = {
    { key = "paintball", hash = `WEAPON_PAINTBALL`,     ammo = 9999, name = "Paintball" },
    { key = "pistol",    hash = `WEAPON_PISTOL`,        ammo = 9999, name = "Pistol" },
    { key = "combat",    hash = `WEAPON_COMBATPISTOL`,  ammo = 9999, name = "Combat Pistol" },
    { key = "smg",       hash = `WEAPON_SMG`,           ammo = 9999, name = "SMG" },
    { key = "ar",        hash = `WEAPON_ASSAULTRIFLE`,  ammo = 9999, name = "Assault Rifle" },
    { key = "carbine",   hash = `WEAPON_CARBINERIFLE`,  ammo = 9999, name = "Carbine Rifle" },
    { key = "shotgun",   hash = `WEAPON_PUMPSHOTGUN`,   ammo = 9999, name = "Pump Shotgun" },
    { key = "sniper",    hash = `WEAPON_SNIPERRIFLE`,   ammo = 9999, name = "Sniper Rifle" },
}
```

All weapons have infinite ammo (9999). You can add or remove weapons from this list.

***

### Gun Game

Weapon progression in Gun Game mode (9 tiers):

```lua
Config.GunGame = {
    Weapons = {
        { hash = `WEAPON_KNIFE`,          ammo = 1,  name = "Knife" },
        { hash = `WEAPON_PISTOL`,         ammo = 12, name = "Pistol" },
        { hash = `WEAPON_COMBATPISTOL`,   ammo = 12, name = "Combat Pistol" },
        { hash = `WEAPON_SMG`,            ammo = 30, name = "SMG" },
        { hash = `WEAPON_ASSAULTRIFLE`,   ammo = 30, name = "Assault Rifle" },
        { hash = `WEAPON_CARBINERIFLE`,   ammo = 30, name = "Carbine Rifle" },
        { hash = `WEAPON_SNIPERRIFLE`,    ammo = 5,  name = "Sniper Rifle" },
        { hash = `WEAPON_PUMPSHOTGUN`,    ammo = 8,  name = "Pump Shotgun" },
        { hash = `WEAPON_KNIFE`,          ammo = 1,  name = "Final Knife" },
    },
}
```

| Tier | Weapon        | Ammo |
| ---- | ------------- | ---- |
| 1    | Knife         | 1    |
| 2    | Pistol        | 12   |
| 3    | Combat Pistol | 12   |
| 4    | SMG           | 30   |
| 5    | Assault Rifle | 30   |
| 6    | Carbine Rifle | 30   |
| 7    | Sniper Rifle  | 5    |
| 8    | Pump Shotgun  | 8    |
| 9    | Final Knife   | 1    |

The first player to complete all 9 tiers wins the match.

***

### Wager System

```lua
Config.Wager = {
    enabled       = true,    -- Enable/disable wagers
    min           = 100,     -- Minimum bet
    max           = 50000,   -- Maximum bet
    defaultAmount = 500,     -- Default bet amount
}
```

When enabled, the lobby creator can set a wager amount. Each player who joins pays the wager. Winners split the pot at the end of the match. If the lobby is disbanded, all wagers are refunded.

***

### Medal System

```lua
Config.Medals = {
    multiKillWindow = 4000,       -- Window for multi-kills (ms)
    streakLevels    = { 3, 5, 7 }, -- Kill streak thresholds
}
```

| Medal         | Condition                 |
| ------------- | ------------------------- |
| First Blood   | First kill of the match   |
| Double Kill   | 2 kills within 4 seconds  |
| Triple Kill   | 3 kills within 4 seconds  |
| Multi Kill    | 4+ kills within 4 seconds |
| Killing Spree | 3 kills without dying     |
| Rampage       | 5 kills without dying     |
| Unstoppable   | 7 kills without dying     |
| Headshot      | Kill with a headshot      |

***

### Interaction Point

```lua
Config.InteractPoint = vec4(135.006592, -2956.377930, 6.189697, 269.291351)
```

Coordinates of the point where players interact to open the paintball menu.

***

### Map Blip

```lua
Config.Blip = {
    enabled    = true,
    coords     = vec3(146.04, -2955.03, 6.19),
    sprite     = 311,        -- Paintball / target sprite
    color      = 27,         -- Purple
    scale      = 0.85,
    name       = "Paintball",
    shortRange = true,
}
```

Set `enabled = false` to disable the blip.

***

### Target System

```lua
Config.TargetPriority = { "ox_target", "qb-target", "Var-Interact", "fallback" }
```

The script auto-detects the first available target system in priority order. If none is found, it falls back to a 3D marker with the `E` key.

***

### Team Uniforms

```lua
Config.TeamUniforms = nil  -- Uses built-in defaults
```

Set to `nil` to use the built-in uniforms. You can define your own by replacing this with a table of clothing components for each team (RED, BLUE, FFA) with male/female variants.

***

### Discord Webhook

```lua
Config.Discord = {
    enabled   = false,
    webhook   = "",         -- Paste your Discord webhook URL here
    botName   = "Paintball",
    avatarUrl = "",         -- Bot avatar URL (optional)
    color     = 3447003,    -- Embed color (blue by default)
}
```

When enabled, a Discord embed is sent at the end of each match with the results, MVP, and player statistics.

***

### Language

The language is auto-detected via the framework. The file `shared/lang.lua` contains translations for:

* **English** (`en`)
* **French** (`fr`)

You can add more languages by following the same format in `shared/lang.lua`.


---

# 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://doc.var-fivem.com/paintball/configuration/config.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.
