GetSoundEffectParameters: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 6: Line 6:
<syntaxhighlight lang="lua">table getSoundEffectParameters( element sound, string effectName )</syntaxhighlight>  
<syntaxhighlight lang="lua">table getSoundEffectParameters( element sound, string effectName )</syntaxhighlight>  
===Required Arguments===
===Required Arguments===
*'''sound''': the sound element.
*'''sound''': the [[sound]] element.
*'''effectName''': the effect name.
*'''effectName''': the effect name.



Revision as of 16:04, 7 August 2021

This function gets parameters of a sound effect.

Syntax

table getSoundEffectParameters( element sound, string effectName )

Required Arguments

  • sound: the sound element.
  • effectName: the effect name.

Returns

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

Parameters

Requirements

Minimum server version n/a
Minimum client version 1.5.8-9.20914

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.8-9.20914" />

Example

Click to collapse [-]
Client
local soundEchoParams = getSoundEffectParameters(sound, "echo")

See Also