getSoundEffectParameters | Multi Theft Auto: Wiki Skip to content

getSoundEffectParameters

Client-side
Server-side
Shared

This function gets the parameters of a sound effect. See effects parameters.

OOP Syntax Help! I don't understand this!

  • Method: sound:getEffectParameters(...)

Syntax

table|false getSoundEffectParameters ( sound/player theSound, string effectName )
Required Arguments
  • theSound: The sound element to get the sound effect parameters of.
  • effectName: The name of the effect whose parameters you want to retrieve
    • gargle
    • compressor
    • echo
    • i3dl2reverb
    • distortion
    • chorus
    • parameq
    • reverb
    • flanger

Returns

  • table|false: params

Returns a table with the parameter names as the keys, and their values. If the specified effect name is not valid, false is returned.

Code Examples

client
local sound = playSound ("music.mp3")
setSoundEffectEnabled (sound, "echo", true)
local echoParams = getSoundEffectParameters (sound, "echo")
print (echoParams.feedback) -- 50
iprint (echoParams)
--[[
{
feedback = 50,
leftDelay = 500,
panDelay = false,
rightDelay = 500,
wetDryMix = 50
}
]]