PT-BR/getSoundEffects: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{BR/Funcao cliente}} Retorna o estado de todos os efeitos de um áudio. ==Sintaxe== <syntaxhighlight lang="lua">table getSoundEffects ( element audio )...")
 
mNo edit summary
Line 30: Line 30:
==Veja também==
==Veja também==
{{Client_audio_functions}}
{{Client_audio_functions}}
[[en:getSoundEffects]]
[[hu:getSoundEffects]]
[[hu:getSoundEffects]]
[[ru:getSoundEffects]]
[[ru:getSoundEffects]]

Revision as of 18:40, 15 August 2021

Template:BR/Funcao cliente Retorna o estado de todos os efeitos de um áudio.

Sintaxe

table getSoundEffects ( element audio )


OOP Syntax Help! I don't understand this!

Method: audio:getEffects(...)


Argumentos necessários

Retorno

Retorna uma tabela com os nomes dos efeitos nas chaves e seus estados no valor caso bem sucedido. Do contrário retorna false.

Nomes dos efeitos sonoros:

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

Exemplo

function desativaEfeitoGargle(audio)
    for _, efeito in ipairs(getSoundEffects(audio)) do -- Passa pela tabela completa de efeitos sonoros desse audio
        if efeito == "gargle" then -- Se o efeito é o 'gargle' então:
            setSoundEffectEnabled(audio, "gargle", false) -- Desativa o efeito 'gargle'
        end
    end
end

Veja também

Shared