getRadioPlaybackState
Client-side
Captures GTA's current native radio station, track, playback position, flags, and queued track state.
Syntax
table|false getRadioPlaybackState()Returns
A complete playback snapshot with radioOn, station, mode, trackId, trackType, trackIndex, position, length, flags and queue; false when the native manager is unavailable.
Ownership and lifecycle
The snapshot describes one client's native GTA radio manager. Neon does not synchronize it automatically; a resource that wants shared playback must relay and restore snapshots itself.
Important behavior
- This is GTA radio state, not an MTA sound element.
- The snapshot is client-local until a resource chooses to synchronize it.
Example
local saved = getRadioPlaybackState()-- laterif saved then setRadioPlaybackState(saved) endWhere this comes from
SOURCECLuaRadioPlaybackDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaRadioPlaybackDefs.cpp INTRODUCED / EXTENDEDebd8931b9Read the commit and why the change was made TEST RESOURCE native-radio-playback test-resources/native-radio-playback
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Native GTA radio playback works →