setSoundEffectEnabled
Client
Turns an audio effect on or off on a sound or a player's voice. When turned on, the effect starts with its default parameters.
bool setSoundEffectEnabled(sound|player target, string effect [, bool enabled = false])
Parameters
| Name | Type | Description |
|---|---|---|
| target | sound|player | A sound, a dui, or a player to change their voice in voice chat. |
| effect | string | The effect's name: chorus, compressor, distortion, echo, flanger, gargle, i3dl2reverb, parameq, reverb or radio. |
| enabled | bool | true to turn the effect on, false to turn it off.default false |
Returns
true if the effect ended up as asked, false if the effect name does not exist or the target was not found.
Example
addEventHandler("onClientPlayerVoiceStart", root, function()
setSoundEffectEnabled(source, "radio", true)
end)Coming from MTAThe
radio effect, which makes the sound seem to come out of a walkie-talkie, does not exist in MTA.