natives.MISSION AUDIO PLAY: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(Created page with "{{ScriptItem |endpoint = client |games = vc |type = function |name = natives.MISSION_AUDIO_PLAY |parameters = none |usage = Play a mission audio track previously loaded via LOAD_MISSION_AUDIO. Must be called after LOAD_MISSION_AUDIO to play the loaded audio. |notes = Requires a prior call to LOAD_MISSION_AUDIO(audioId, audioName) to load the audio asset. The audio plays once and cannot be stopped early. |return1 = void |returnFail1 = void |exampleJS = addCommandHandler("...")
(No difference)

Revision as of 17:09, 11 June 2026

Function Client Only icon-vc.png Online and Offline

Available since Client 1.0.0
void natives.MISSION_AUDIO_PLAY(none)
The natives.MISSION_AUDIO_PLAY function is used to Play a mission audio track previously loaded via LOAD_MISSION_AUDIO. Must be called after LOAD_MISSION_AUDIO to play the loaded audio.

Parameters

Documentation Missing: Parameters

Return

void This function doesn't return a value.

Notes

  • Requires a prior call to LOAD_MISSION_AUDIO(audioId, audioName) to load the audio asset. The audio plays once and cannot be stopped early.

Examples

Example 1 - JavaScript:

addCommandHandler("missiontune", function(cmd, args) {
    if (args && args.length > 0) {
        natives.LOAD_MISSION_AUDIO(1, args[0]);
        natives.MISSION_AUDIO_PLAY();
        message("Playing mission audio: " + args[0]);
    } else {
        message("Usage: /missiontune <audioName>");
    }
});

Compatibility

There isn't any compatibility information for this function.

Related

Client Related

GTAIII Logo.png icon-vc.png icon-sa.png gta.cancelMission
GTAIII Logo.png icon-vc.png icon-sa.png icon-iv.png gta.onMission
GTAIII Logo.png icon-vc.png icon-sa.png icon-iv.png gta.startMission