# Configuration

This page documents every config field found in the shipped `config.lua` + a few *optional* fields used by code with defaults.

***

### Locale / UI

#### `Config.UILocale`

Language used for **NUI** text dictionary.

* Default: `'en'`
* Options: `'en'`, `'hr'` (ships both in `/locales`)

#### `Config.Locale`

Language used for **client/server notifications** (`TR()` helper).

* Default: `'en'`

***

### Killfeed

#### `Config.KillFeed`

Controls the killfeed widget.

```lua
Config.KillFeed = {
  enable = true,
  mode = 'lobby',         -- 'off' | 'global' | 'lobby'
  proximity = false,      -- if true: distance filter
  proxRange = 100.0,
  command = 'killovi',    -- local toggle per player
  maxItems = 6,
  showTeamColors = true,
  showHeadshot = true,
  showStreaks = true,
  sAndDEvents = true,
  icons = 'webp',
}
```

* **mode**
  * `off` = no feed
  * `global` = show across buckets (no bucket check)
  * `lobby` = only for players in the same lobby/bucket
* **proximity**
  * If enabled, feed lines may be filtered by distance (`proxRange`).

***

### Ambulance bridge

#### `Config.Ambulance.provider`

Revive integration provider.

```lua
Config.Ambulance = {
  provider = 'auto' -- 'auto' | 'wasabi' | 'qb' | 'esx' | 'tk' | 'none'
}
```

`auto` picks the first started ambulance resource from: `wasabi_ambulance`, `tk_ambulancejob`, `qb-ambulancejob`, `esx_ambulancejob`.

If `none`, Wargames falls back to an internal instant revive event.

***

### Notifications

#### `Config.Notify`

Notification routing.

```lua
Config.Notify = {
  system = 'okok', -- 'ox' | 'okok' | 'esx' | 'none'
  duration = 3000,
  types = {
    success='success',
    error='error',
    warning='warning',
    inform='info'
  }
}
```

* `system = 'ox'` uses `lib.notify` / ox\_lib notify
* `system = 'okok'` uses `exports['okokNotify']:Alert(...)`
* `system = 'esx'` uses `ESX.ShowNotification` or `esx:showNotification`
* `none` disables notifications

***

### Entry marker (menu open)

```lua
Config.Entry = {
  coords = vec3(116.9144, -2957.8857, 6.0),
  radius = 1.6
}
```

Players open the Wargames NUI by standing inside `radius` and pressing **E**.

***

### Instances / routing buckets

```lua
Config.UseInstance = true
Config.Instance = {
  dynamic = true,
  base = { FFA = 6000, TDM = 7000, SND = 8000 }
}
```

* `UseInstance = true` puts players into routing buckets per lobby
* `dynamic = true` creates a separate bucket per created lobby
* `base` are starting bucket IDs used for each mode

***

### Safe inventory snapshot (ox\_inventory)

```lua
Config.SafeInventory = {
  enabled = true,
  blacklist = { 'weapon_stickybomb' }
}
```

When enabled, Wargames snapshots the player inventory on join and restores it on leave. Blacklisted items are not restored (useful for bomb item / special weapons).

> Requires `ox_inventory` running. If ox\_inventory isn’t started, the resource will fallback gracefully.

***

### Clothing system (team outfits)

```lua
Config.ClothingSystem = {
  enabled = true,
  provider = '0resmon', -- 'illenium' | 'esx_skin' | '0resmon' | 'fivem-appearance'
  illeniumResource = 'illenium-appearance',
  oResmonResource = '0r-clothing',
  fivemAppearanceResource = 'fivem-appearance',
  debug = true,

  componentMap = {
    mask   = 1,
    pants  = 4,
    shoes  = 6,
    shirt  = 8,
    jacket = 11,
  }
}
```

Outfits are applied per mode/team via:

* `Config.TDM.Outfits`
* `Config.SND.Outfits`

If disabled, no outfit swapping is done.

***

### FFA

```lua
Config.FFAMaxPlayers = 10
```

#### Zone polygon

```lua
Config.Zone = {
  vec3(...), vec3(...), vec3(...), vec3(...)
}
```

#### Zone enforcement

```lua
Config.ZoneEnforce = { enabled=true, graceMs=3000, warnEveryMs=1000 }
```

#### Clean spawns (safe spawn list)

```lua
Config.CleanSpawns = {
  vec3(...), vec3(...), ...
}
Config.MinSpawnSeparation = 5.0
```

#### Match target kills

```lua
Config.KillTarget = 3
```

***

### TDM

```lua
Config.TDM = {
  TargetKills = 2,
  TeamMax = 5,
  SpawnRadius = 5.0,
  Spawns = {
    SAS    = vec3(...),
    WARCOM = vec3(...)
  }
}
```

#### Outfits

```lua
Config.TDM.Outfits = {
  enabled = true,
  teams = {
    SAS    = { mask={...}, shirt={...}, jacket={...}, pants={...}, shoes={...} },
    WARCOM = { ... }
  }
}
```

***

### Inventory / Loadouts

#### `Config.UseOxInventory`

* `true` = server gives loadouts via ox\_inventory
* `false` = client uses native weapon giving

#### `Config.Loadouts`

Each key becomes a selectable loadout in the NUI.

```lua
Config.Loadouts = {
  Assault = {
    label='Assault',
    weapons = {
      { name='WEAPON_CARBINERIFLE', ammo=120 },
      { name='WEAPON_PISTOL', ammo=60 },
    },
    items = {},    -- ox_inventory items if you want
    armor = 100,
    hp = 200
  },
  ...
}
```

#### Optional: `Config.ForceAmmo`

If set (number), overrides every weapon’s `ammo` value.

***

### S\&D

```lua
Config.SND = {
  LobbyWait     = 12,
  LobbyRetry    = 10,
  Rounds        = 10,
  RoundTime     = 180,
  SwapAfter     = 5,
  PlantTimeMs   = 5000,
  DefuseTimeMs  = 5000,
  BombTimer     = 60,
  PlantSite     = vec3(...),
  PlantRadius   = 2.2,
  DefuseRadius  = 2.2,
  DefuseHold    = 5000,

  Teams = { Attack='Terrorists', Defend='Operators' },

  Spawns = {
    Terrorists = vec3(...),
    Operators  = vec3(...)
  },
  SpawnRadius = 5.0
}
```

#### Outfits

```lua
Config.SND.Outfits = {
  enabled = true,
  teams = {
    Operators  = { ... },
    Terrorists = { ... }
  }
}
```

***

### Optional fields used by code

#### `Config.KillConfirmWindow`

Used to validate kill confirmation timing.

* Default (if unset): `10000` ms

Set it if your server has delayed death events.
