---
description: >-
  Thank you for choosing ES-Radio for your FiveM server! We hope it enhances
  your roleplay experience.
---

# RADIO

Welcome to ES-Radio, the most comprehensive radio communication system for FiveM servers. This documentation will guide you through the installation, configuration, and usage of ES-Radio to enhance your roleplay experience. ES-Radio provides a realistic communication platform with features like password-protected channels, text messaging, voice integration, and job-restricted frequencies. Whether you're running a police department, emergency services, or civilian roleplay server, ES-Radio offers the tools needed for immersive communication.

### Features

#### Password-Protected Channels

Create secure channels with password protection to limit access to specific groups or organizations.

#### Text Messaging

Send text messages through the radio interface, perfect for situations where voice communication isn't practical.

#### Job-Restricted Frequencies

Configure specific frequencies to be accessible only by certain jobs, such as police or emergency services.

#### Favorite Channels

Players can save frequently used channels for quick access.

#### Discord Avatar Integration

Display players' Discord profile pictures in the radio interface for a personalized experience.

#### Voice System Integration

Seamlessly works with popular FiveM voice systems:

* pma-voice
* mumble-voip
* saltychat

### Commands

* /changenick \<nickname> - Change your display name on the radio

### Framework Integration

ES-Radio automatically detects and integrates with:

* ESX
* QB-Core

### Voice System Integration

ES-Radio automatically integrates with:

* pma-voice
* mumble-voip
* saltychat

#### Configuration for Voice Systems

No additional configuration is needed as ES-Radio automatically detects and integrates with your voice system.

### Discord Integration

To enable Discord avatar integration:

1. Create a Discord application at Discord Developer Portal
2. Create a bot for your application
3. Copy the bot token
4. Add the token to settings.lua
5. Make sure your server has Discord identifiers enabled

### Troubleshooting

#### Radio Not Working

1. Ensure the radio item is properly added to your database/inventory system
2. Check that players have the radio item in their inventory
3. Verify that your voice system is properly configured and working
4. Check the server console for any error messages

#### Voice Not Working Through Radio

1. Ensure your voice system (pma-voice, mumble-voip, or saltychat) is properly installed and configured
2. Check that players are on the same radio frequency
3. Verify that the radio volume is not set to 0

#### Discord Avatars Not Showing

1. Verify your Discord bot token is correctly set in settings.lua
2. Ensure your server has Discord identifiers enabled
3. Check that players have linked their Discord accounts to FiveM

### FAQ

#### Q: Can I use ES-Radio with a custom framework?

A: ES-Radio is designed to work with ESX and QB-Core. Custom frameworks may require additional modifications.

#### Q: How many players can use the same radio channel?

A: There is no hard limit on the number of players per channel. However, for performance reasons, we recommend keeping it under 50 players per channel.

#### Q: Can I customize the radio UI?

A: Yes, you can modify the HTML, CSS, and JavaScript files in the html folder to customize the appearance of the radio interface.

#### Q: Does ES-Radio support multiple languages?

A: Yes, ES-Radio currently supports English and German. You can add additional languages by editing the Config.Locale table in config.lua.

#### Q: Is there a way to restrict certain frequencies to specific jobs?

A: Yes, use the Config.jobChannels setting in config.lua to restrict frequencies to specific jobs.

### Configuration

ES-Radio is designed to work out of the box with minimal configuration. However, you can customize various aspects through the config.lua file:

```
Config = {}

Config.Framework = "auto" -- auto, esx or qb
Config.radioName = "radio" -- item name
Config.defaultVolume = 50 -- default volume of the radio, 0 - 100
Config.Language = "en" -- en, de

Config.changeNickCommand = "changenick" -- /changenick <nick>
Config.LoopTime = 500 -- checks for microphone usage, lower = more responsive but higher server load

Config.RadioProp = 'prop_cs_hand_radio' -- prop model used when radio is active

Config.jobChannels = { -- channels where only designated jobs can participate
    [1] = {
        frequency = {
            "1",
            "2",
            "3",
            "4",
            "5"
        },
        jobs = {
            "police",
            "bcso"
        }
    },
    [2] = {
        frequency = {
            "2.0",
            "2"
        },
        jobs = {
            "ambulance"
        }
    }
}
```

#### Discord Integration

To enable Discord avatar integration, edit the settings.lua file:

```
Settings = {
    -- set your discord bot token (not webhook!)
    -- See Discord Integration section for instructions
    botToken = "YOUR_DISCORD_BOT_TOKEN"
}
```

### Installation

#### Prerequisites

* A running FiveM server
* ESX or QB-Core framework
* One of the following voice systems: pma-voice, mumble-voip, or saltychat

#### Steps

1. Download the ES-Radio resource from your purchase platform
2. Extract the files to your server's resources folder
3. Add ensure es-radio to your server.cfg (make sure it loads after your framework and voice system)
4. Add the radio item to your server's items database:

```
-- For ESX (items table)
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('radio', 'Radio', 1, 0, 1);

-- For QB-Core (qb-core/shared/items.lua)
["radio"] = {
    ["name"] = "radio",
    ["label"] = "Radio",
    ["weight"] = 1000,
    ["type"] = "item",
    ["image"] = "radio.png",
    ["unique"] = false,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "A portable communication device"
},
```

###

