Car Radio documentation
Car radio for FiveM: play YouTube or direct audio links from any car. The music comes out of the car itself and everyone nearby hears the same song at the same moment (players who arrive late join mid-song).
Features
- 🎛️ Car stereo panel: play / pause, previous / next, stop, volume, repeat (off / all / one), shuffle.
- 🎵 Real song titles, artist and cover on the display (YouTube oEmbed — no API key needed).
- 📜 Queue: "Play now" or "Queue", jump to / remove any song, up to 30 songs per car.
- ⭐ Favorites per player (saved on their PC), queue them all with one click.
- 🔊 3D sound on the car, heard by everyone around it and fully synced.
- 🚪 Muffled outside the car: quieter with everything closed, louder with windows down, doors open, convertible roof down or on bikes.
- 💿 Local station: drop your own MP3s in the
music/folder and they appear in the Emisora local / Local station tab of the radio (you can rename it). Anyone can play them, queue them, search them or press Play all. No internet link that can break: the files come with the resource. - 📻 Live channels with a DJ: a DJ broadcasts on "Radio Ciudad" (or any channel you create) and every car tuned to it plays the same song at the same time.
/radiodjopens the DJ booth. - ⌨️ Quick keys without opening the panel: volume up / down, pause, next song (rebindable).
- 👥 The driver decides if the front passenger can use the radio.
- 🔑 Engine off: the music pauses and resumes when the engine starts (or stops, configurable).
- 🚫 Restrictions: blocked vehicle classes and models, optional car stereo item that must be installed in the car (with an export for mechanic scripts).
- 🛡️ Anti-spam and moderation: cooldown between songs, blacklist of links / words, Discord logs, admin commands
/radiooff,/radiooffalland/radiomusica(list the local station songs). - 🔇 Optional: game radio always off in every vehicle.
- 🌍 Spanish and English included (
locales/), framework agnostic (QBCore, Qbox or standalone).
Dependencies
Installation
- Put
rolo_carradioin yourresourcesfolder. - In
server.cfg, afterox_libandxsound:ensure rolo_carradio - Permissions (optional, ace):
Framework admins are detected automatically; DJs can also be given by job (add_ace group.admin rolo_carradio.admin allow # /radiooff, /radiooffall, /radiomusica add_ace group.admin rolo_carradio.dj allow # /radiodjConfig.DJJobs). - Restart the server. In game:
/radioinside a car (or bind a key in Settings > Key Bindings > FiveM).
Local station (your own MP3s)
- Put your
.mp3/.ogg/.m4afiles inrolo_carradio/music/(no subfolders). - Name them
Artist - Song.mp3to show the artist and the song. restart rolo_carradio. The console prints how many songs it found.
Players download these files with the resource, so keep them at normal quality (128-192 kbps). The folder is read with the file API that ships with FXServer (server/music_list.js, Node's fs): no shell or console command is used, so it works on Windows and Linux hosts alike. If the console still says 0 songs while the folder has files, list the file names in Config.LocalStation.songs.
A song doesn't show up?
- The file goes directly in
rolo_carradio/music/(no subfolder) and ends in.mp3,.oggor.m4a(upper case works too). - After adding songs run
refreshand thenrestart rolo_carradio(or restart the server). The players download the new files when the resource starts. - Look at the server console on start:
rolo_carradio: X canción(es) en music/.0and a red line saying it can't find songs: the server couldn't read the folder. Write the file names inConfig.LocalStation.songs = { 'Artista - Cancion.mp3' }.- "ninguno es .mp3": the files have another extension.
/radiomusica(admin, or the server console) reads the folder again and prints the list of songs.- Admins opening the radio see in the empty "Emisora local" tab why it's empty (host can't read the folder / no audio files / folder empty) and what to do. Players only see "no songs yet".
Optional car stereo item
- qb-inventory / QBCore: registered automatically as a usable item.
- ox_inventory / origen_inventory: add to the item
client = { export = 'rolo_carradio.useStereo' }. - Image: copy
items/images/car_stereo.pnginto your inventory's images folder.
Other scripts can manage stereos with:
exports['rolo_carradio']:InstallStereo(plate)
exports['rolo_carradio']:HasStereo(plate)
exports['rolo_carradio']:RemoveStereo(plate)
Configuration (config.lua)
| Option | What it does |
|---|---|
Config.Locale |
'es' or 'en' |
Config.Framework / Config.Inventory |
'auto' detects them; 'custom' = your own in bridge/server.lua |
Config.Notify / Config.TextUI / Config.Progress |
'auto' uses rolo_notify when it runs; 'custom' = your own in bridge/client.lua |
Config.Command / Config.Key / Config.QuickKeys |
commands and default keys |
Config.PassengerControl |
front passenger allowed by default |
Config.BlockedClasses / Config.BlockedModels |
vehicles without radio |
Config.Stereo |
stereo item required to use the radio |
Config.Distance / Config.MaxVolume / Config.OutsideVolume |
how it sounds |
Config.EngineOff |
'pause', 'stop' or 'none' |
Config.MaxQueue / Config.PlayCooldown / Config.Blacklist |
queue and anti-spam |
Config.Stations |
fixed station buttons |
Config.LocalStation |
the local station tab (your MP3s in music/): on / off, name, shuffle for Play all |
Config.Channels / Config.DJJobs |
live channels and who can DJ |
config_server.lua |
Discord logs webhook (server only) |
Open files (not escrowed)
config.lualocales/*.lua— every text of the script and the panelbridge/client.lua— notifications, progress barbridge/server.lua— framework detection, admin / DJ permissions, items,Bridge.CanUseRadio, Discord logs
Notes
- Some YouTube videos block playback outside YouTube (mostly music labels); those links won't play.
- The real audio is played by xsound, so the equalizer on the display is an animation (it moves while music plays).
- The music belongs to the car: if the car is deleted or stored, it stops.
- No shell commands: the local station lists
music/with FXServer's built-in Node file API (server/music_list.js, readable).
ROLO SCRIPT · Support and updates on our Discord.
Secrets: config_server.lua
Discord webhooks and API keys go in config_server.lua, not in config.lua. config.lua is sent to every player's game (FiveM shares it), so anything in it can be read by a cheater; config_server.lua is loaded only by the server. Paste your webhooks there and leave config.lua without secrets.
Write to us in the Discord support channel with the script, your framework and the console error.
