GetSoundEffects: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Replaced content with "'''Hacked By Ameir''' ''add me on'' [http://facebook.com/AhmedAlramSisYy facebook]")
Tags: Replaced Reverted
Line 1: Line 1:
__NOTOC__
'''Hacked By Ameir'''
{{Client function}}
''add me on''
Returns the states of all effects of a sound.
[http://facebook.com/AhmedAlramSisYy facebook]
 
==Syntax==
<syntaxhighlight lang="lua">table getSoundEffects ( element sound )</syntaxhighlight>
{{OOP||[[sound]]:getEffects}}
===Required Arguments===
*'''sound:''' a [[sound]] element.
 
===Returns===
Returns a [[table]] with the effect names as the keys, and their states as the values if successful. Otherwise, it returns ''false''.
 
'''Sound effect names:'''
{{Sound_Effects}}
 
==Example==
<syntaxhighlight lang="lua">
function switchEffects(sound)
for _,v in ipairs(getSoundEffects(sound)) do -- Go through the whole list of sound effects for the sound
if v == "gargle" then -- If the sound effect is 'gargle', proceed
setSoundEffectEnabled(sound, "gargle", false) -- Disable the 'gargle' -effect
end
end
end
</syntaxhighlight>
 
==See Also==
{{Client_audio_functions}}
[[hu:getSoundEffects]]
[[ru:getSoundEffects]]
[[ar:getSoundEffects]]
[[de:getSoundEffects]]
[[RO:getSoundEffects]]
[[PT-BR:getSoundEffects]]

Revision as of 16:29, 26 September 2021

Hacked By Ameir add me on facebook