Skip to content

RMSCRIPTS-DEV/rm-carradio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rm-carradio — RM-SCRIPTS

rm-carradio

RM-SCRIPTS · Minimal in-car radio UI for FiveM — tune native GTA stations from a clean NUI (hold-to-open, configurable list).

Store  ·  Documentation  ·  Discord


rm-carradio is a client-only resource: React + Mantine NUI, ox_lib keybinds and cache.vehicle, no framework required. Stations are GTA radio entries (gtaStation names) with display names, frequencies, and Lucide icon names in config.lua.

Requirements

  • ox_lib — shared @ox_lib/init.lua provides lib and cache. Start ox_lib before rm-carradio (manifest declares dependency 'ox_lib').

Installation

  1. Place rm-carradio in your resources folder.

  2. Ensure ox_lib is installed and started.

  3. Add to server.cfg (order matters):

    ensure ox_lib
    ensure rm-carradio
  4. Build the web UI if you change the React app or clone without web/build:

    cd web
    pnpm install
    pnpm build

Configuration (config.lua)

Option Description
Config.Enabled Master toggle for the radio script
Config.OpenKey Keyboard key for hold-to-open (ox_lib keybind)
Config.RadioStations List of stations: id, name, frequency, gtaStation, icon (Lucide name, see lucide.dev/icons)

The client prepends an OFF row in the UI; you only edit the GTA station table.

Client exports

Export Returns Description
PlayStation stationId — 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

Example

exports['rm-carradio']:PlayStation('pop')
exports['rm-carradio']:StopStation()

local id = exports['rm-carradio']:GetCurrentStation()
local open = exports['rm-carradio']:IsRadioOpen()

ox_lib

The client uses lib.addKeybind for open/close and lib.onCache('vehicle', …) so the in-vehicle loop only runs while cache.vehicle is set — no extra “am I in a vehicle?” polling.


© RM-SCRIPTS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors