setSoundEffectEnabled
Client-side
 Server-side
 Shared
 Used to enable or disable specific sound effects. Use a player element to control a players voice with this function.
OOP Syntax Help! I don't understand this!
- Method: sound:setEffectEnabled(...)
Syntax
bool setSoundEffectEnabled ( sound/player theSound, string effectName, bool enable )Required Arguments
- theSound: A sound element or a player element which will affect the voice broadcast.
-  effectName:
The effect you want to enable or disable. - gargle
- compressor
- echo
- i3dl2reverb
- distortion
- chorus
- parameq
- reverb
- flanger
 
- enable: true if you want to enable the effect, false if you want to disable it.
Returns
- bool: result
Returns true if the effect was set successfully, false otherwise.
Code Examples
 client   
 This example creates a sound and set's the flanger sound effect enabled.
addCommandHandler("flanger", function(cmd, enabled)  if isElement(waterSplashes) then    setSoundEffectEnabled(waterSplashes, cmd, enabled)  else    waterSplashes = playSound("splashes.mp3", true)    setSoundEffectEnabled(waterSplashes, cmd, enabled)  endend, true) --set it case sensitive as we are going to get the command name and use it in the setSoundEffectEnabledChangelog
See Also
Audio Functions
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundEffectParameters
- getSoundBufferLength
- getSoundEffects
- getSoundFFTData
- getSoundLevelData
- getSoundLength
- getSoundMaxDistance
- getSoundMinDistance
- getSoundMetaTags
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPosition
- setSoundProperties
- setSoundPaused
- setSoundSpeed
- setSoundVolume
- stopSound
 
 