# 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.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Sound
- **URL**: https://wiki.mymp.gg/en/setSoundEffectEnabled

## Syntax

```lua
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

```lua
addEventHandler("onClientPlayerVoiceStart", root, function()
    setSoundEffectEnabled(source, "radio", true)
end)
```

### Coming from MTA

The `radio` effect, which makes the sound seem to come out of a walkie-talkie, does not exist in MTA.

## See also

- [getSoundEffects (Client)](https://wiki.mymp.gg/en/getSoundEffects.md): Lists the audio effects of a sound or a player's voice and tells which are on.
- [setSoundEffectParameter (Client)](https://wiki.mymp.gg/en/setSoundEffectParameter.md): Changes a parameter of an audio effect that is on, on a sound or a player's voice.
- [getSoundEffectParameters (Client)](https://wiki.mymp.gg/en/getSoundEffectParameters.md): Returns the current parameters of an audio effect that is on, on a sound or a player's voice.
