Retro Radio
Development
Section titled โDevelopmentโThis file is for developers integrating other resources with rs_radio or extending the system.
Integration Shape
Section titled โIntegration Shapeโrs_radio is centered around:
- server-authoritative radio state
- client-side emitter/listener behavior
- NUI-driven DJ and listener interfaces
- voice routing through
pma-voice
When integrating with it, think in terms of:
- consuming state
- opening existing UI flows
- extending media/input sources
- respecting the broadcast authority model
Important Integration Areas
Section titled โImportant Integration AreasโState Consumption
Section titled โState Consumptionโserver/sv_state.lua is the main state authority layer.
This is where other systems typically integrate if they need to know:
- whether the station is live
- what is on-air
- emitter mesh state
- call state
- scheduler state
- weather snapshot payloads relayed for radio purposes
UI Bridge Expectations
Section titled โUI Bridge Expectationsโclient/utils/ui_bridge.lua is the main client-side bridge into NUI.
Use it as the reference point for:
- DJ tablet open/close behavior
- listener UI open/close behavior
- boombox listener context
- NUI callback registration
Audio / World Playback
Section titled โAudio / World Playbackโclient/cl_emitter.lua is the main world-audio and listener-emitter behavior layer.
This is the place to inspect when integrating or debugging:
- vehicle emitters
- merged emitter clusters
- boombox prop emitters
- enclosure reverb
- mic ducking around world playback
- xSound-like world playback behavior now internalized into the resource
Voice / Calls
Section titled โVoice / CallsโKey files:
client/cl_dj_voice.luaserver/sv_call_system.luaserver/sv_phone_routing.lua
These are the relevant areas if you need to extend:
- call queue behavior
- caller screening
- patch-to-air logic
- cohost/participant voice routing
External Resource Expectations
Section titled โExternal Resource ExpectationsโFrameworks
Section titled โFrameworksโSupported integration targets:
- QBCore
- QBOX
- ESX
Inventories
Section titled โInventoriesโSupported:
qb-inventoryox_inventory
Targets
Section titled โTargetsโSupported:
qb-targetox_target
Weather
Section titled โWeatherโIf using external weather authority, rs_radio should consume weather state rather than own it.
Expected example:
Config.WeatherUseExternalAuthority = trueConfig.WeatherAuthorityResource = "rs_weather"
Development Rules Of Thumb
Section titled โDevelopment Rules Of Thumbโ- Keep one source of truth for station state.
- Avoid duplicate world-weather controllers.
- Avoid duplicate world-audio controllers for the same emitter path.
- Treat carried/prop emitters as a separate performance class from vehicles.
- Keep YouTube deck-safe playback and on-air stream playback conceptually separate.
Useful Files To Start With
Section titled โUseful Files To Start Withโfxmanifest.luaconfig.luaserver/sv_state.luaserver/sv_scheduler.luaserver/sv_boombox.luaserver/sv_call_system.luaclient/cl_emitter.luaclient/utils/ui_bridge.luanui/script.js
What This File Is Not
Section titled โWhat This File Is NotโThis is not meant to be a full internal architecture spec. It is an integration-oriented guide so another engineer can find the right entrypoints quickly.