RedM Natives

SET_AUDIO_SUBMIX_EFFECT_PARAM_FLOAT

Sets a floating-point parameter for a submix effect.

Hash0x9A209B3C
Runtime nameSetAudioSubmixEffectParamFloat
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

void SET_AUDIO_SUBMIX_EFFECT_PARAM_FLOAT(int submixId, int effectSlot, int paramIndex, float paramValue);

Parameters

NameTypeDescription
submixIdint

The submix.

effectSlotint

The effect slot for the submix. It is expected that the effect is set in this slot beforehand.

paramIndexint

The parameter index for the effect.

paramValuefloat

The parameter value to set.

Returns void

Description

Cfx.re native reference

Sets a floating-point parameter for a submix effect.

Usage

Lua
SetAudioSubmixEffectParamFloat(submixId, effectSlot, paramIndex, paramValue)

-- always works, by hash
Citizen.InvokeNative(0x9a209b3c, submixId, effectSlot, paramIndex, paramValue)
JavaScript and C#
JavaScript
SetAudioSubmixEffectParamFloat(submixId, effectSlot, paramIndex, paramValue);

// by hash
Citizen.invokeNative('0x9a209b3c', submixId, effectSlot, paramIndex, paramValue + 0.0000001);
C#
Function.Call((Hash)0x9a209b3c, submixId, effectSlot, paramIndex, paramValue);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.