AR/getSoundEffects: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
Returns the states of all effects of a sound.
هذه الوظيفة تجلب حالات تأثيرات الصوت في جدول


==Syntax==  
==Syntax==  
Line 10: Line 10:


===Returns===
===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:'''
'''مثال:'''
 
<syntaxhighlight lang="lua">
{
    gargle = false,
    compressor = false,
    echo = true,
    i3dl2reverb = true,
    distortion = false,
    chorus = false,
    parameq = false,
    reverb = false,
    flanger = false
}
</syntaxhighlight>
 
'''أسماء تأثيرات الصوت:'''
{{Sound_Effects}}
{{Sound_Effects}}



Revision as of 00:54, 6 November 2013

هذه الوظيفة تجلب حالات تأثيرات الصوت في جدول

Syntax

table getSoundEffects ( element sound )

Required Arguments

Returns

تنتج جدول فيه اسماء الحالات كمفاتيح للقيم

مثال:

{
    gargle = false,
    compressor = false,
    echo = true,
    i3dl2reverb = true,
    distortion = false,
    chorus = false,
    parameq = false,
    reverb = false,
    flanger = false
}

أسماء تأثيرات الصوت:

  • gargle
  • compressor
  • echo
  • i3dl2reverb
  • distortion
  • chorus
  • parameq
  • reverb
  • flanger

Example

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

أنظر أيضاً