ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setSoundEffectParameter

Function

setSoundEffectParameter

ClientSound (client)Identical to MTA:SA

Sets a parameter of an effect, even one that is off. Names and ranges are as in MTA (e.g. echo: wetDryMix, feedback, leftDelay, rightDelay, panDelay; reverb: inGain, reverbMix, reverbTime, highFreqRTRatio); bandpass: lowCut, highCut, gain.

Syntax

bool setSoundEffectParameter(sound theSound, string effectName, string effectParameter, mixed effectParameterValue)

Arguments

theSoundsound
The sound.
effectNamestring
The effect name.
effectParameterstring
The parameter name.
effectParameterValuemixed
A number (or a bool for panDelay). A value out of range gives false and a warning with the range.

Returns

true on success.

Example

A voice over the phone.

local call = playSound("audio/call.mp3")
setSoundEffectEnabled(call, "bandpass", true)
setSoundEffectParameter(call, "bandpass", "lowCut", 400)
setSoundEffectParameter(call, "bandpass", "highCut", 3000)

See also