Car Radio
Installation
Install rm-carradio on your server.
Installation
Requirements
- ox_lib — start before
rm-carradio(manifest declaresdependency 'ox_lib')
Step 1 — Download
Clone or download from GitHub and place the folder in your resources directory as rm-carradio.
Step 2 — server.cfg
ensure ox_lib
ensure rm-carradioStep 3 — Configure stations
Edit config.lua:
| Option | Description |
|---|---|
Config.Enabled | Master toggle |
Config.OpenKey | Hold-to-open keybind (ox_lib) |
Config.RadioStations | List: id, name, frequency, gtaStation, icon (Lucide name) |
The client prepends an OFF row in the UI — you only edit the GTA station table.
Icons: see lucide.dev/icons.
Step 4 — Web UI (if needed)
If you change the React app or clone without web/build:
cd web
pnpm install
pnpm buildStep 5 — Restart
Hold your configured key while in a vehicle to open the radio.
Client exports
exports['rm-carradio']:PlayStation('pop')
exports['rm-carradio']:StopStation()
local id = exports['rm-carradio']:GetCurrentStation()
local open = exports['rm-carradio']:IsRadioOpen()| Export | Returns | Description |
|---|---|---|
PlayStation | — | Play configured station ('radio_off' turns radio off) |
StopStation | — | Stops current station / clears state |
GetCurrentStation | string | nil | Current station id or nil |
IsRadioOpen | boolean | Whether the NUI is visible |
