> 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-radio/configuration.md).

# Configuration

All configuration is done in `config/config.lua`. Below is a complete reference.

***

### General Settings

| Option      | Type   | Default  | Description                                           |
| ----------- | ------ | -------- | ----------------------------------------------------- |
| `Framework` | string | `'auto'` | `'auto'`, `'qbx'`, `'qb'`, `'esx'`, `'standalone'`    |
| `Inventory` | string | `'auto'` | `'auto'`, `'ox'`, `'qb'`, `'qs'`, `'codem'`, `'none'` |
| `Locale`    | string | `'en'`   | Language code: `'en'` or `'tr'`                       |

***

### Item Settings

```lua
Config.Item = {
    Enabled = true,
    Name = 'radio'
}
```

| Option    | Type    | Default   | Description                      |
| --------- | ------- | --------- | -------------------------------- |
| `Enabled` | boolean | `true`    | Whether a radio item is required |
| `Name`    | string  | `'radio'` | Item name in inventory system    |

> If `Enabled` is `false`, the radio can be opened without needing the item.

***

### Frequency Settings

```lua
Config.Frequency = {
    Min = 1.00,
    Max = 999.99,
    Decimals = 2
}
```

| Option     | Type   | Default  | Description                    |
| ---------- | ------ | -------- | ------------------------------ |
| `Min`      | number | `1.00`   | Minimum frequency value        |
| `Max`      | number | `999.99` | Maximum frequency value        |
| `Decimals` | number | `2`      | Decimal places for frequencies |

***

### Volume Settings

```lua
Config.DefaultVolume = 100
Config.MaxVolume = 100
```

***

### Dual Channel Listening

```lua
Config.DualListen = {
    Enabled = true,
    MaxChannels = 2
}
```

When enabled, players can connect to **two frequencies simultaneously** and switch between them as the active transmitting channel.

***

### Radio Effects

```lua
Config.RadioEffects = {
    Enabled = true,
    ClickSound = true,
    BackgroundNoise = false
}
```

| Option            | Type    | Default | Description                    |
| ----------------- | ------- | ------- | ------------------------------ |
| `Enabled`         | boolean | `true`  | Enable radio sound effects     |
| `ClickSound`      | boolean | `true`  | Play click sound on open/close |
| `BackgroundNoise` | boolean | `false` | Enable ambient radio static    |

***

### Earphone Mode

```lua
Config.EarphoneMode = {
    Enabled = true,
    Default = true
}
```

* **Earphone mode (true):** Radio audio is only heard by the player.
* **Speaker mode (false):** Radio audio is audible to nearby players.

***

### Text Messaging

```lua
Config.TextMessage = {
    Enabled = true,
    MaxLength = 256,
    MaxHistory = 50
}
```

Allows players to send text messages through the radio interface to everyone on the same frequency.

***

### GPS Location Sharing

```lua
Config.GPS = {
    Enabled = true,
    ShareLocation = true,
    WaypointDuration = 60
}
```

| Option             | Type    | Default | Description                                 |
| ------------------ | ------- | ------- | ------------------------------------------- |
| `Enabled`          | boolean | `true`  | Enable GPS features in radio                |
| `ShareLocation`    | boolean | `true`  | Allow sharing location with channel members |
| `WaypointDuration` | number  | `60`    | How long shared waypoints last (seconds)    |

***

### Emergency Signal

```lua
Config.Emergency = {
    Enabled = true,
    Cooldown = 30,
    NotifyAllInChannel = true,
    ShareLocation = true,
    Sound = true
}
```

| Option               | Type    | Default | Description                                  |
| -------------------- | ------- | ------- | -------------------------------------------- |
| `Enabled`            | boolean | `true`  | Enable emergency signal feature              |
| `Cooldown`           | number  | `30`    | Cooldown between emergency signals (seconds) |
| `NotifyAllInChannel` | boolean | `true`  | Notify all members on the frequency          |
| `ShareLocation`      | boolean | `true`  | Auto-share location with emergency           |
| `Sound`              | boolean | `true`  | Play emergency sound to recipients           |

***

### Favorites & Recent Channels

```lua
Config.Favorites = {
    Enabled = true,
    MaxFavorites = 10
}

Config.RecentChannels = {
    Enabled = true,
    MaxRecent = 5
}
```

***

### Channel Password

```lua
Config.ChannelPassword = {
    Enabled = true,
    MaxAttempts = 3,
    LockoutTime = 60
}
```

After `MaxAttempts` failed password entries, the player is locked out for `LockoutTime` seconds.

***

### Call History

```lua
Config.CallHistory = {
    Enabled = true,
    MaxHistory = 100
}
```

***

### Admin Panel

```lua
Config.Admin = {
    Enabled = true,
    UseAce = false,
    AcePermission = 'hane_radio.admin',
    DiscordIDs = {
        '123456789012345678',
    }
}
```

| Option          | Type    | Default              | Description                                   |
| --------------- | ------- | -------------------- | --------------------------------------------- |
| `Enabled`       | boolean | `true`               | Enable admin features                         |
| `UseAce`        | boolean | `false`              | `true` = ACE permission, `false` = Discord ID |
| `AcePermission` | string  | `'hane_radio.admin'` | ACE permission string (if UseAce = true)      |
| `DiscordIDs`    | table   | `{}`                 | Discord IDs authorized as admin               |

***

### Webhook Logging

```lua
Config.Webhook = {
    Enabled = false,
    URL = '',
    Color = 3447003,
    BotName = 'Hane Radio Logs',
    Avatar = ''
}
```

Logs the following events to Discord: channel join, channel leave, emergency signal, text messages, admin actions.

***

### UI Settings

```lua
Config.UI = {
    Position = { x = 85, y = 50 },
    Theme = 'dark',
    Draggable = true,
    ShowSignal = true,
    ShowMiniHUD = true
}
```

| Option        | Type    | Default        | Description                           |
| ------------- | ------- | -------------- | ------------------------------------- |
| `Position`    | table   | `{x=85, y=50}` | Default UI position (percentage)      |
| `Theme`       | string  | `'dark'`       | UI theme                              |
| `Draggable`   | boolean | `true`         | Allow dragging the radio UI           |
| `ShowSignal`  | boolean | `true`         | Show signal strength indicator        |
| `ShowMiniHUD` | boolean | `true`         | Show mini HUD when radio is minimized |
