_SET_VARIABLE_ON_SOUND_WITH_NAME
Sets the variable variableName to variableValue on the named sound.
Signature
void _SET_VARIABLE_ON_SOUND_WITH_NAME(const char* variableName, float variableValue, const char* audioName, const char* audioRef); // 0x9821B68CD3E05F2B b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | variableName | const char* |
| 2 | variableValue | float |
| 3 | audioName | const char* |
| 4 | audioRef | const char* |
Facts
| Name | _SET_VARIABLE_ON_SOUND_WITH_NAME |
|---|---|
| Hash | 0x9821B68CD3E05F2B |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
Citizen.InvokeNative(0x9821B68CD3E05F2B, -- _SET_VARIABLE_ON_SOUND_WITH_NAME
"text", -- const char* variableName
0.0, -- float variableValue
"text", -- const char* audioName
"text" -- const char* audioRef
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x9821B68CD3E05F2B", // _SET_VARIABLE_ON_SOUND_WITH_NAME
"text", // const char* variableName
0.0, // float variableValue
"text", // const char* audioName
"text" // const char* audioRef
);Function.Call((Hash)0x9821B68CD3E05F2B, // _SET_VARIABLE_ON_SOUND_WITH_NAME
"text", // const char* variableName
0.0f, // float variableValue
"text", // const char* audioName
"text" // const char* audioRef
);Related AUDIO natives
- _SET_VARIABLE_ON_SOUND_WITH_ID
- _SET_SOUND_RELATIONSHIP_ON_PED
- _STOP_SOUND_WITH_NAME
- _PLAY_SOUND_FROM_ENTITY_WITH_SET
- _PLAY_SOUND_FRONTEND_WITH_SOUND_ID
- _STOP_SOUND_WITH_ID
- _HAS_SOUND_AUDIO_NAME_FINISHED
- _PLAY_SOUND_FROM_POSITION_WITH_ID
- PREPARE_SOUND_WITH_ENTITY
- SET_AMBIENT_VOICE_NAME
- SET_AUDIO_SCENE_VARIABLE
- _SET_VOFX_PED_VOICE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.