PT-BR/getSoundPan: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{BR/Funcao cliente}} Essa função é usada para obter o nível de distribuição dos volumes esquerdo e direito de um áudio. ==Sintaxe== <syntaxhighl...")
 
mNo edit summary
Line 29: Line 29:
{{Client_audio_functions}}
{{Client_audio_functions}}


[[EN:getSoundPan]]
[[AR:getSoundPan]]
[[AR:getSoundPan]]
[[HU:getSoundPan]]
[[HU:getSoundPan]]

Revision as of 22:19, 17 August 2021

Template:BR/Funcao cliente Essa função é usada para obter o nível de distribuição dos volumes esquerdo e direito de um áudio.

Sintaxe

float getSoundPan ( element audio )

Sintaxe POO(OOP) Não entendeu o que significa isso?

Método: audio:getPan(...)
Variável: .pan
Oposto: setSoundPan

Argumentos necessários

Retorno

Retorna um float variando de -1.0 (esquerdo) à 1.0 (direito), false caso algo der errado.

Exemplo

Click to collapse [-]
Client
function obterDistribuicao()
    local audio = playSound("audio.mp3")
    setSoundPan(audio , -1)
    outputChatBox("A distribuição atual é " .. getSoundPan(audio ))
end
addCommandHandler("distribuicao", obterDistribuicao)

Veja também

Shared