The Lab
AUDIO native

_SET_VARIABLE_ON_SOUND_WITH_ID

returns void3 paramsbuild 1207

Sets the variable variableName to variableValue on the sound playing on soundId.

Signature

C
void _SET_VARIABLE_ON_SOUND_WITH_ID(int soundId, const char* variableName, float variableValue); // 0x503703EC1781B7D6 b1207

Parameters

#NameType
1soundIdint
2variableNameconst char*
3variableValuefloat

Facts

Facts about _SET_VARIABLE_ON_SOUND_WITH_ID
Name
_SET_VARIABLE_ON_SOUND_WITH_ID
Hash
0x503703EC1781B7D6
Namespace
Returns
void
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
Citizen.InvokeNative(0x503703EC1781B7D6, -- _SET_VARIABLE_ON_SOUND_WITH_ID
  0, -- int soundId
  "text", -- const char* variableName
  0.0 -- float variableValue
)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x503703EC1781B7D6", // _SET_VARIABLE_ON_SOUND_WITH_ID
  0, // int soundId
  "text", // const char* variableName
  0.0 // float variableValue
);
C#
Function.Call((Hash)0x503703EC1781B7D6, // _SET_VARIABLE_ON_SOUND_WITH_ID
  0, // int soundId
  "text", // const char* variableName
  0.0f // float variableValue
);
All AUDIO natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.