AudioClient

setAudioSceneVariable

SET_AUDIO_SCENE_VARIABLE0xEF21A9EF089A2668

The GTA V native SET_AUDIO_SCENE_VARIABLE of the AUDIO namespace, as LS:MP client scripts call it: the global function setAudioSceneVariable, in JavaScript and in Lua.

SignatureJavaScript
setAudioSceneVariable(scene: string, variable: string, value: number): void
SignatureLua
setAudioSceneVariable(scene: string, variable: string, value: number)

Usage

JavaScript
setAudioSceneVariable(scene, variable, value);
Lua
setAudioSceneVariable(scene, variable, value)

Parameters

ParameterTypeJavaScriptLua
scenestringstringstring
variablestringstringstring
valuefloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Reference

Namespace
Audio AUDIO
In the game
void SET_AUDIO_SCENE_VARIABLE(const char* scene, const char* variable, float value)
Hash
0xEF21A9EF089A2668

Open in the interactive natives reference