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

Function

setSoundEffectEnabled

ClientSound (client)Identical to MTA:SA

Turns an effect on or off for a sound from playSound/playSound3D. Available effects: chorus, compressor, distortion, echo, flanger, gargle, i3dl2reverb, parameq, reverb (as in MTA) and bandpass (a pass band, e.g. a voice over the phone).

Syntax

bool setSoundEffectEnabled(sound theSound, string effectName, bool enable)

Arguments

theSoundsound
The sound.
effectNamestring
The effect name.
enablebool
true = on.

Returns

true on success.

Example

local music = playSound("audio/radio.mp3", true)
setSoundEffectEnabled(music, "echo", true)
setSoundEffectParameter(music, "echo", "leftDelay", 300)

Notes

The first effect turned on moves the sound to the effects mixer at the same play position (MP3 and WAV up to 10 minutes).

See also