PT-BR/playSoundFrontEnd: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
			
		
		
	
 (Created page with "{{BR/Funcao compartilhada}} __NOTOC__ Essa função reproduz alguns efeitos sonoros da interface do GTA:SA para o jogador especificado.  {{Note|Esses efeitos sonoros podem ser...")  | 
			
(No difference) 
 | 
Latest revision as of 22:57, 18 August 2021
Essa função reproduz alguns efeitos sonoros da interface do GTA:SA para o jogador especificado.
Sintaxe
Click to collapse [-]
Serverbool playSoundFrontEnd ( player jogador, int idAudio )
Sintaxe POO(OOP) Não entendeu o que significa isso?
- Método: jogador:playSoundFrontEnd(...)
 
Argumentos necessários
- jogador: o jogador que você deseja reproduzir o áudio.
 - idAudio: um int especificando o ID do áudio. Valores válidos são:
- 0 - 20 Selection sounds
 - 27 - 30 Bullet sounds
 - 32 - 33 Selection sounds
 - 34 Radio static
 - 35 Stop Radio static
 - 37 - 38 Tick
 - 40 Selection sounds
 - 41 - 42 Tick (no ammo)
 - 43 - 45 Race countdown
 - 46 Repair
 - 47 White noise static
 - 48 Stop White noise static
 - 49 Static short
 - 101 Countdown/selection
 
 
Click to expand [+]
ClientRetorno
Retorna true se o áudio começou a reproduzir com sucesso, do contrário retorna false.
Exemplo
Click to collapse [-]
serverEste exemplo reproduz um áudio assim que o player spawnar.
function onPlayerSpawn ( theSpawnpoint, theTeam )
    playSoundFrontEnd ( source, 16 )
end
addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn )
Click to collapse [-]
clientEste exemplo reproduz um áudio ao executar o comando '/audio'.
function onSoundEvent ( )
    playSoundFrontEnd ( 16 )
end
addCommandHandler("audio", onSoundEvent)
Veja também
 getSoundEffectParameters
 getSoundFFTData
 getSoundLength
 getSoundLevelData
 getSoundMaxDistance
 getSoundMetaTags
 getSoundMinDistance
 getSoundPan
 getSoundPosition
 getSoundProperties
 getSoundSpeed
 getSoundVolume
 getSoundWaveData