RoviDev Studio

Vehicles
Core
Tools
Jobs
Audio
Economy
Bundles
$17.99

rd_carradio — Car Radio Script

🚗 Your car. Your soundtrack.

The music changes when you roll the windows down. Pick a station or paste a YouTube link, queue songs and save favourites to a USB stick. Full volume inside the car; outside, it is muffled and opens up as the car opens up.

Why you'll want it

  • 📻 Music in every car: 19 example stations and YouTube links, with a queue and volume per vehicle.
  • 💾 Favourites you can carry: keep your songs on a USB stick item, or in the database if you prefer no item.
  • 🪟 Sound that reacts to the car: windows, doors, roof, trunk and hood change what people outside hear.
  • 🔑 Rules that feel real: engine-on requirement, accessory mode and key-based control from outside.
  • 🎧 Every player in control: a personal volume and a streamer mode that mutes car radios for that player only.

First release (v1.0). Report any issue and we fix it.

What you get

  • The rd_carradio resource (v1.0).
  • Its own control panel (F7 or /carradio) and a now-playing mini HUD.
  • SQL file for the favourites table and USB stick item definitions for ox_inventory and qb-core.
  • English and Spanish locales and a commented config.lua with 19 example stations.

Features

Music sources

  • HTTPS radio streams from Config.Stations and YouTube links (watch, youtu.be, shorts, YouTube Music).
  • Queue of 8 tracks by default, loop, restart, next, volume per car and a personal volume saved on each client.

USB stick favourites

  • Save the current YouTube song (stations cannot be saved): up to 15 per stick by default.
  • Play one, add it to the queue or play them all.
  • With Config.Car.RequireItem = false, favourites are stored per player in the database.

Realistic sound

  • Outside volume moves between ClosedFactor (0.14) and OpenFactor (0.85), with a low-pass filter from 650 Hz to 9000 Hz.
  • Each opening adds its own weight: window, door, roof, trunk and hood. Audible up to 26 m outside by default.
  • Sitting in another car or inside a building muffles it further.
  • Lowered windows are read from the cm_win state bag that rd_carmenu publishes (configurable); without it, only broken windows count.
  • The default NUI backend gives low-pass and stereo; the optional xsound backend gives volume only.

Engine and control rules

  • Plays only with the engine on by default; stopping the engine pauses it and keeps the queue.
  • Accessory mode keeps it playing for 600 s after the engine stops (0 = pause at once).
  • Control from outside: 'keys' (default), 'anyone' or 'never', within 8 m, using your own key check or rd_bridge's.
  • Per-vehicle state, distance, key checks and request rate limits are enforced on the server.

How it works

A player gets in a car and presses F7. They choose a station, a YouTube link or a favourite. The server stores the state for that vehicle and every player hears it by position: crisp inside, muffled outside, clearer as the car opens.

Configuration

  • General: Key, Command, AudioBackend ('nui' or 'xsound'), Stations, AllowYoutube, QueueMax, UrlRateLimitMs, ShowMiniHud.
  • Config.Car: RequireItem, Item, MaxFavs, DefaultVolume, HearDistance, ClosedFactor / OpenFactor, ClosedLowpass / OpenLowpass, Open weights, WindowsBag.
  • Rules: RequireEngine, PauseWhenEngineOff, AccessorySeconds, OutsideControl, OutsideDistance, HasKeys.

Requirements

  • Required: ox_lib, oxmysql, rd_bridge (free core).
  • Optional: ox_inventory (or an inventory rd_bridge supports) for the USB stick, xsound (alternative audio backend), rd_carmenu (Music tab and lowered windows).
  • The stations are only examples: make sure each station's terms allow your use.

Install in 5 steps

  • 1. Copy rd_carradio into your resources; start ox_lib, oxmysql and rd_bridge first.
  • 2. Add the USB stick item from items/ (or set Config.Car.RequireItem = false and skip it).
  • 3. Add ensure rd_carradio to server.cfg. With Config.AutoInstallSQL = true the favourites table is created for you (or import sql/install.sql).
  • 4. Review config.lua: stations and Config.Car (distances, isolation, accessory mode, outside control).
  • 5. Get in a car and press F7 (or /carradio).

Compatibility

QBCore · Qbox · ESX · standalone through rd_bridge (adapters reviewed against each resource's official documentation). Works alone with its own panel. With rd_carmenu running, its Music tab controls the radio too. rd_boombox is the street counterpart: separate audio, no dependency either way.

Protected with Cfx.re Asset Escrow; config.lua, locales, SQL, item definitions and docs stay editable.

Exports & events

  • Client exports: GetCarAudio(vehicle), CarControl(action, data, vehicle), RefreshCarInfo(), SetMasterVolume(v), GetMasterVolume(), IsStreamerMode(), SetStreamerMode(bool), OpenRadio(), CloseRadio().
  • CarControl actions: station, yt, toggle, stop, next, restart, volume, loop, unqueue, fav_save, fav_del, fav_play, fav_all.
  • Local event: rd_carradio:streamerChanged(on).
  • Player commands: /carradio_volume [0-100|reset], /carradio_streamer (remembered between sessions). Admin command: /pendrive_give <id>.

FAQ

  • Nothing plays with the engine off? That is RequireEngine. Use AccessorySeconds or turn the requirement off.
  • Can I skip the USB stick? Yes. Config.Car.RequireItem = false stores favourites in the database.
  • Does it need rd_carmenu? No. rd_carmenu only adds a Music tab and the lowered-window state.
  • Why won't a YouTube video play? Some videos block embedded playback; the track is skipped automatically.
  • Has it been tested on live servers? Not yet. This is the first release (v1.0): the code was syntax-checked and reviewed by hand. Report any issue and we fix it.

🇪🇸 En español

Tu coche. Tu banda sonora.

La música cambia cuando bajas las ventanillas. Elige una emisora o pega un enlace de YouTube, pon canciones en cola y guarda tus favoritas en un pendrive. Volumen completo dentro del coche; fuera se oye amortiguada y se abre a medida que abres el coche.

Por qué lo querrás

  • 📻 Música en cada coche: 19 emisoras de ejemplo y enlaces de YouTube, con cola y volumen por vehículo.
  • 💾 Favoritas que llevas encima: guarda tus canciones en un pendrive o, si prefieres no usar ítem, en la base de datos.
  • 🪟 Un sonido que reacciona al coche: ventanillas, puertas, capota, maletero y capó cambian lo que se oye fuera.
  • 🔑 Reglas creíbles: motor encendido obligatorio, modo accesorios y control desde fuera con llaves.
  • 🎧 Cada jugador manda: volumen personal y modo streamer que silencia las radios solo para ese jugador.

Primera versión (v1.0). Si encuentras cualquier fallo, avísanos y lo arreglamos.

Qué incluye

  • El recurso rd_carradio (v1.0).
  • Panel de control propio (F7 o /carradio) y mini HUD «sonando ahora».
  • Archivo SQL de la tabla de favoritas y definiciones del pendrive para ox_inventory y qb-core.
  • Textos en español e inglés y un config.lua comentado con 19 emisoras de ejemplo.

Funciones

  • Fuentes de música: emisoras HTTPS de Config.Stations y enlaces de YouTube (watch, youtu.be, shorts, YouTube Music). Cola de 8 pistas por defecto, bucle, reiniciar y siguiente, volumen por coche y volumen personal guardado en cada cliente.
  • Favoritas en el pendrive: guarda la canción de YouTube que suena (las emisoras no se guardan), hasta 15 por pendrive por defecto. Reproduce una, añádela a la cola o ponlas todas. Con Config.Car.RequireItem = false se guardan por jugador en la base de datos.
  • Sonido realista: el volumen exterior va de ClosedFactor (0,14) a OpenFactor (0,85), con un filtro paso bajo de 650 Hz a 9000 Hz. Cada abertura suma su peso: ventanilla, puerta, capota, maletero y capó. Se oye hasta 26 m fuera por defecto. Si vas en otro coche o dentro de un edificio, se amortigua aún más. Las ventanillas bajadas se leen del state bag cm_win que publica rd_carmenu (configurable); sin él, solo cuentan las rotas. El backend NUI ofrece paso bajo y estéreo; xsound, opcional, solo volumen.
  • Motor y control: por defecto solo suena con el motor encendido; al apagarlo se pausa sin perder la cola. El modo accesorios la mantiene 600 s tras apagar el motor (0 = pausa al instante). Control desde fuera: 'keys' (por defecto), 'anyone' o 'never', a 8 m como máximo, con tu propia comprobación de llaves o la de rd_bridge. Estado por vehículo, distancia, llaves y límites de frecuencia se validan en el servidor.

Cómo funciona

El jugador sube a un coche y pulsa F7. Elige emisora, enlace de YouTube o favorita. El servidor guarda el estado de ese vehículo y cada jugador lo oye según su posición: nítido dentro, amortiguado fuera y más claro cuanto más abierto está el coche.

Configuración

  • General: Key, Command, AudioBackend ('nui' o 'xsound'), Stations, AllowYoutube, QueueMax, UrlRateLimitMs, ShowMiniHud.
  • Config.Car: RequireItem, Item, MaxFavs, DefaultVolume, HearDistance, ClosedFactor / OpenFactor, ClosedLowpass / OpenLowpass, pesos Open, WindowsBag.
  • Reglas: RequireEngine, PauseWhenEngineOff, AccessorySeconds, OutsideControl, OutsideDistance, HasKeys.

Requisitos

  • Obligatorios: ox_lib, oxmysql, rd_bridge (núcleo gratuito).
  • Opcionales: ox_inventory (o un inventario compatible con rd_bridge) para el pendrive, xsound (backend de audio alternativo), rd_carmenu (pestaña Música y ventanillas bajadas).
  • Las emisoras son solo ejemplos: comprueba que los términos de cada una permiten tu uso.

Instalación en 5 pasos

  • 1. Copia rd_carradio en tus recursos; arranca antes ox_lib, oxmysql y rd_bridge.
  • 2. Añade el ítem pendrive de items/ (o pon Config.Car.RequireItem = false y sáltate este paso).
  • 3. Añade ensure rd_carradio al server.cfg. Con Config.AutoInstallSQL = true la tabla de favoritas se crea sola (o importa sql/install.sql).
  • 4. Revisa config.lua: emisoras y Config.Car (distancias, aislamiento, modo accesorios, control desde fuera).
  • 5. Sube a un coche y pulsa F7 (o /carradio).

Compatibilidad

QBCore · Qbox · ESX · standalone mediante rd_bridge (adaptadores revisados contra la documentación oficial de cada recurso). Funciona solo con su propio panel. Con rd_carmenu arrancado, su pestaña Música también controla la radio. rd_boombox es su equivalente para la calle: audio aparte y sin dependencia en ningún sentido.

Protegido con Cfx.re Asset Escrow; config.lua, locales, SQL, definiciones de ítems y documentación quedan editables.

Exports y eventos

  • Exports de cliente: GetCarAudio(vehicle), CarControl(action, data, vehicle), RefreshCarInfo(), SetMasterVolume(v), GetMasterVolume(), IsStreamerMode(), SetStreamerMode(bool), OpenRadio(), CloseRadio().
  • Acciones de CarControl: station, yt, toggle, stop, next, restart, volume, loop, unqueue, fav_save, fav_del, fav_play, fav_all.
  • Evento local: rd_carradio:streamerChanged(on).
  • Comandos de jugador: /carradio_volume [0-100|reset], /carradio_streamer (se recuerda entre sesiones). Comando de admin: /pendrive_give <id>.

Preguntas frecuentes

  • ¿No suena con el motor apagado? Es RequireEngine. Usa AccessorySeconds para el modo accesorios o desactiva el requisito.
  • ¿Puedo prescindir del pendrive? Sí. Con Config.Car.RequireItem = false las favoritas se guardan en la base de datos.
  • ¿Necesita rd_carmenu? No. rd_carmenu solo añade la pestaña Música y el estado de las ventanillas bajadas.
  • ¿Por qué no se reproduce un vídeo de YouTube? Algunos vídeos bloquean la reproducción incrustada; la pista se salta sola.
  • ¿Está probado en servidores reales? Todavía no. Es la primera versión (v1.0): se ha comprobado la sintaxis y se ha revisado el código a mano. Si encuentras cualquier fallo, avísanos y lo arreglamos.
$17.99

RoviDev Studio

Apple PayGoogle PayMastercardVisaAmerican Express
© 2026 RoviDev Studio
The checkout process is owned & operated by Tebex Limited, who handle product fulfilment, billing support and refunds.
Impressum Terms & Conditions Privacy Policy