Radio Station Framework
Development And Integration
Section titled โDevelopment And IntegrationโThis file is for server developers who want to integrate another resource with rs_radio.
It intentionally documents only the supported integration surface. Internal playback, emitter routing, station-state internals, and NUI implementation details are not public API.
Voice Backend
Section titled โVoice BackendโLegacy servers use the RS-modified pma-voice build for DJ, cohost, caller, monitor, and ducking behavior:
Supported FiveM Enhanced servers use the built-in voice API instead. See docs/voice-backends.md for backend selection and troubleshooting.
Integration Principles
Section titled โIntegration Principlesโ- Let
rs_radioown station state. - Let
rs_radioown vehicle/boombox emitter routing. - Use supported events/commands/config instead of mutating internal tables.
- Treat received state payloads as read-only.
- Do not call internal audio/runtime exports. They are not part of the customer-facing API.
Supported Client Events
Section titled โSupported Client EventsโThese are the main client events other resources can use to open or close supported UI flows.
TriggerEvent("rs-radio:openListenerUi")TriggerEvent("rs-radio:openDjTablet", payload)TriggerEvent("rs-radio:openStationAdmin")TriggerEvent("rs-radio:forceCloseDjTablet")Notes:
openListenerUiopens the normal vehicle listener UI path.openDjTabletstill respects station context and permissions.openStationAdminstill respects admin/group permissions.forceCloseDjTabletis useful when another scripted scene needs to close the DJ UI safely.
Boombox UI should normally be opened through the boombox item/target flow, because it needs the correct boombox context.
Supported State Events
Section titled โSupported State EventsโOther resources can listen to these client events for read-only UI or scene awareness.
RegisterNetEvent("rs-radio:updateState", function(state) -- Read-only station state snapshot.end)
RegisterNetEvent("rs-radio:listenerVehicleStatus", function(payload) -- Read-only listener vehicle status.end)
RegisterNetEvent("rs-radio:boomboxListenerStatus", function(payload) -- Read-only boombox listener status.end)
RegisterNetEvent("rs-radio:updateCallQueue", function(queue) -- Read-only caller queue snapshot.end)
RegisterNetEvent("rs-radio:activeCall", function(payload) -- Read-only active call snapshot.end)
RegisterNetEvent("rs-radio:activeCallEnded", function() -- Active call ended.end)
RegisterNetEvent("rs-radio:updateWeather", function(weather) -- Read-only radio-facing weather snapshot.end)These events are intended for displays, scene logic, and lightweight integrations. Do not treat them as permission bypasses or authoritative write paths.
Common Integration Examples
Section titled โCommon Integration ExamplesโOpen the listener UI from another client resource:
TriggerEvent("rs-radio:openListenerUi")Open the station admin UI from an admin-only interaction:
TriggerEvent("rs-radio:openStationAdmin")Close the DJ UI when a scripted scene starts:
TriggerEvent("rs-radio:forceCloseDjTablet")React to station state changes:
RegisterNetEvent("rs-radio:updateState", function(state) if type(state) ~= "table" then return end -- Use state for read-only scene/UI behavior.end)Internal Exports
Section titled โInternal Exportsโrs_radio contains internal exports used by the resource itself.
Those exports are not documented as a public integration API and should not be called by third-party resources.
If your project needs a custom integration beyond the events above, request or add a supported wrapper/export intentionally for that use case instead of depending on internal playback primitives.
Protected Implementation Notes
Section titled โProtected Implementation NotesโMost implementation files are internal and may be escrowed in distributed builds. Server owners and third-party resource developers should treat them as protected implementation details, not edit targets.
High-level protected areas:
- server station state and broadcast logic
- client world emitter runtime
- NUI bridge and callback handling
- browser audio and visualizer implementation
- cohost/caller/mic routing
Customer-editable areas are documented in:
docs/configuration.mddocs/installation.mdconfig.lua
Station content and placement should be managed through the Station Creator/Admin UI where possible.
Validation
Section titled โValidationโFor normal server installs, restart or ensure rs_radio and check the server/F8 console for startup errors.
Maintainer packaging checks are intentionally not part of the public integration API.