> For the complete documentation index, see [llms.txt](https://hane-mod-studio.gitbook.io/hane-mod-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hane-mod-studio.gitbook.io/hane-mod-studio/hane-scripts/hane-dispatch/configuration.md).

# Configuration

All configuration is done in `shared/config.lua`. Below is a complete reference for every option.

***

### General Settings

```lua
Config.Debug = true
```

| Option      | Type    | Default  | Description                                             |
| ----------- | ------- | -------- | ------------------------------------------------------- |
| `Debug`     | boolean | `true`   | Enable debug prints in console                          |
| `Locale`    | string  | `'en'`   | Language code (`'en'` or `'tr'`)                        |
| `Framework` | string  | `'auto'` | Framework override (`'auto'`, `'qbx'`, `'qb'`, `'esx'`) |

***

### Tablet Settings

```lua
Config.UseLbTablet = true
Config.UseOxInventory = true
Config.TabletItemName = 'dispatch_tablet'
Config.TabletCommand = 'dispatch'
Config.TabletOpenMethod = 'both'
```

| Option             | Type    | Default             | Description                                                |
| ------------------ | ------- | ------------------- | ---------------------------------------------------------- |
| `UseLbTablet`      | boolean | `true`              | Forward dispatches to lb-tablet                            |
| `UseOxInventory`   | boolean | `true`              | Enable ox\_inventory item hook                             |
| `TabletItemName`   | string  | `'dispatch_tablet'` | Item name in inventory system                              |
| `TabletCommand`    | string  | `'dispatch'`        | Chat command to open the tablet                            |
| `TabletOpenMethod` | string  | `'both'`            | How to open the tablet: `'item'`, `'command'`, or `'both'` |

***

### Job Configuration

```lua
Config.Jobs = {
    ['police'] = {
        label = 'Police',
        color = '#3b82f6',
        blipColor = 3
    },
}
```

| Property    | Type   | Description                           |
| ----------- | ------ | ------------------------------------- |
| `label`     | string | Display name shown in the dispatch UI |
| `color`     | string | HEX color used in the UI for this job |
| `blipColor` | number | GTA blip color ID for map markers     |

> Add or remove jobs as needed to match your server's job names.

***

### Exempt Jobs

```lua
Config.ExemptJobs = {
    'army',
}
```

Jobs listed here will **not** trigger automatic shooting detection alerts. Useful for military or training scenarios.

***

### KOD / CODE System

```lua
Config.KodCommand = 'kod'
Config.KodCooldown = 5000
```

| Option        | Type   | Default | Description                       |
| ------------- | ------ | ------- | --------------------------------- |
| `KodCommand`  | string | `'kod'` | Chat command name for code alerts |
| `KodCooldown` | number | `5000`  | Cooldown between code alerts (ms) |

#### Code Definitions

Each code in `Config.Codes` follows this structure:

```lua
['0'] = {
    label = 'CODE 0',
    description = 'Drop everything, emergency situation (Officer down)',
    priority = 'high',    -- 'high', 'medium', 'low'
    jobs = { 'police', 'vespucci', 'ambulance', 'sheriff' }
},
```

| Property      | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| `label`       | string | Display label for the code                     |
| `description` | string | Description shown in the dispatch notification |
| `priority`    | string | Priority level: `'high'`, `'medium'`, `'low'`  |
| `jobs`        | table  | List of jobs that will receive this code alert |

**Included codes:** 0, 1, 2, 2E, 3, 4, 6A, 6C, 6G, 8, 9, 12, 30, 37, 38, 44, 45, 99

***

### Shooting Detection

```lua
Config.ShootingDetection = {
    enabled = true,
    cooldown = 30000,
    automaticWeaponCooldown = 10000
}
```

| Option                    | Type    | Default | Description                               |
| ------------------------- | ------- | ------- | ----------------------------------------- |
| `enabled`                 | boolean | `true`  | Enable automatic shooting detection       |
| `cooldown`                | number  | `30000` | Cooldown for pistol/standard weapons (ms) |
| `automaticWeaponCooldown` | number  | `10000` | Cooldown for automatic weapons (ms)       |

> The system automatically classifies weapons into categories (Pistol, SMG, Rifle, Machine Gun, Sniper, Shotgun, Heavy Weapon, Throwable) and sends the appropriate alert type.

***

### Display Settings

```lua
Config.NotifyDuration = 30
Config.BlipDuration = 60
```

| Option           | Type   | Default | Description                                   |
| ---------------- | ------ | ------- | --------------------------------------------- |
| `NotifyDuration` | number | `30`    | How long notifications stay visible (seconds) |
| `BlipDuration`   | number | `60`    | How long map blips remain active (seconds)    |
