requestMissionAudio
Client-side
Preloads a supported GTA script-audio event and returns a resource-owned opaque handle.
Syntax
int|false requestMissionAudio(int eventId)Arguments
eventIdintNative event in 1800..1829 or 2000..45400; custom event 65535 is rejected.
Returns
An opaque generation-scoped handle, or false when the event is unsupported or all four native slots are occupied.
Ownership and lifecycle
Mission-audio handles belong to the resource generation that created them and are released on stop. Mission-passed tunes are local one-shot frontend tracks and create no handle.
Where this comes from
SOURCECLuaAudioDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaAudioDefs.cpp INTRODUCED / EXTENDED28b42898bRead the commit and why the change was made RELATED CATEGORY HARNESS native-mission-audio-test Category-level coverage · test-resources/native-mission-audio-test
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How Native mission and frontend audio works →