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

# Installation

Step 1 — Download & Extract

1. Download `hane_radio` from your Tebex purchase.
2. Extract the `hane_radio` folder into your server's `resources` directory.

```
resources/
└── [scripts]/
    └── hane_radio/
```

***

### Step 2 — Add to Server Config

Add the following to your `server.cfg`:

```cfg
ensure ox_lib
ensure pma-voice
ensure hane_radio
```

> ⚠️ Both `ox_lib` and `pma-voice` must be started **before** `hane_radio`.

***

### Step 3 — Register the Radio Item

Register the radio item in your inventory system.

#### ox\_inventory

Add to `ox_inventory/data/items.lua`:

```lua
['radio'] = {
    label = 'Radio',
    weight = 1000,
    allowArmed = true,
    consume = 0,
    client = {
        export = 'hane_radio.useRadio'
    }
},
```

#### qb-inventory / qs-inventory

Add to your shared items file:

```lua
['radio'] = {
    name = 'radio',
    label = 'Radio',
    weight = 1000,
    type = 'item',
    image = 'radio.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Walkie-Talkie Radio'
},
```

> For qb/qs inventory, register a useable item callback that triggers the radio open event.

***

### Step 4 — Configure

Open `config/config.lua` and adjust your settings:

```lua
Config.Framework = 'auto'    -- auto / qbx / qb / esx / standalone
Config.Inventory = 'auto'    -- auto / ox / qb / qs / codem / none
Config.Locale = 'en'         -- en / tr

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

***

### Step 5 — Configure Channels

Edit `config/channels.lua` to set up your server's radio channels. See the Channels page for full documentation.

***

### Step 6 — Admin Setup (Optional)

Configure admin access in `config/config.lua`:

```lua
Config.Admin = {
    Enabled = true,
    UseAce = false,                        -- true = ACE, false = Discord ID
    AcePermission = 'hane_radio.admin',    -- ACE permission string
    DiscordIDs = {
        '123456789012345678',              -- Replace with actual Discord IDs
    }
}
```

***

### Step 7 — Webhook Logging (Optional)

```lua
Config.Webhook = {
    Enabled = false,
    URL = 'https://discord.com/api/webhooks/...',
    Color = 3447003,
    BotName = 'Hane Radio Logs',
    Avatar = ''
}
```

***

### Step 8 — Restart Server

Restart your server or use:

```
ensure hane_radio
```

You should see in console:

```
[hane_radio] Bridge loaded | Framework: qbx | Inventory: ox | Side: SERVER
[hane_radio] Bridge loaded | Framework: qbx | Inventory: ox | Side: CLIENT
[hane_radio] Locale loaded: en
```

***

### ✅ Verification

1. Give yourself the `radio` item.
2. Use the item to open the radio interface.
3. Set a frequency and verify voice communication works with another player on the same channel.
4. Test emergency signal, text messaging, and GPS sharing features.
