PT-BR/isSoundLooped: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0159|1.5.8|20785|Essa função é usada para retornar se um elemento de áudio está habilitado para repetir.}}...") |
mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{PT-BR/Client_function}} | ||
{{New feature/item|3.0159|1.5.8|20785|Essa função é usada para retornar se um elemento de [[sound|áudio]] está habilitado para repetir.}} | {{New feature/item|3.0159|1.5.8|20785|Essa função é usada para retornar se um elemento de [[sound|áudio]] está habilitado para repetir.}} | ||
Line 35: | Line 35: | ||
==Veja também== | ==Veja também== | ||
{{ | {{PT-BR/Funcoes_audio_client}} | ||
[[EN:isSoundLooped]] | [[EN:isSoundLooped]] |
Latest revision as of 20:10, 1 April 2023
Essa função é usada para retornar se um elemento de áudio está habilitado para repetir.
Sintaxe
bool isSoundLooped(element audio)
Sintaxe POO(OOP) Não entendeu o que significa isso?
- Método: audio:isLooped(...)
- Oposto: setSoundLooped
Argumentos necessários
- audio: O elemento de áudio ao qual você deseja saber se está habilitado para repetir.
Retorno
Retorna true caso o elemento de áudio estiver habilitado para repetir, do contrário retorna false.
Exemplo
local audio = playSound("audio.mp3", true) addCommandHandler("alternar", function() if not isElement(audio) then return outputChatBox("Não foi possível carregar o áudio") end local podeRepetir = not isSoundLooped(audio) setSoundLooped(audio, podeRepetir) if podeRepetir then outputChatBox("O áudio vai repetir...") else outputChatBox("O áudio não vai mais repetir...") end end)
Veja também
getSoundEffectParameters
getSoundFFTData
getSoundLength
getSoundLevelData
getSoundMaxDistance
getSoundMetaTags
getSoundMinDistance
getSoundPan
getSoundPosition
getSoundProperties
getSoundSpeed
getSoundVolume
getSoundWaveData