setSoundEffectParameter | Multi Theft Auto: Wiki Skip to content

setSoundEffectParameter

Client-side
Server-side
Shared

This function sets the parameter of a sound effect. See effects parameters.

OOP Syntax Help! I don't understand this!

  • Method: sound:setEffectParameter(...)

Syntax

bool setSoundEffectParameter ( sound/player theSound, string effectName, string effectParam, var paramValue )
Required Arguments
  • theSound: The sound element.
  • effectName: The name of the effect whose parameter you want to change
    • gargle
    • compressor
    • echo
    • i3dl2reverb
    • distortion
    • chorus
    • parameq
    • reverb
    • flanger
  • effectParam: The parameter name.
  • paramValue: The parameter value.

Returns

  • bool: result

Returns true if effect have been set successfully, false otherwise.

Code Examples

client
--An example via a timer
local mySound = playSound("discoSound.mp3", 0, 0, 10)
setSoundEffectEnabled(mySound, "echo", true)
setTimer(function()
setSoundEffectParameter(mySound, "echo", "wetDryMix", 80)
end, 1, 1)

Changelog

  • 1.6.0 r23232Allow fx parameters for a player's voice.