PlaySFX: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | __NOTOC__ | ||
{{Client function}} | |||
{{New feature/item|3.0134|1.3.4|5731| | {{New feature/item|3.0134|1.3.4|5731| | ||
This function plays a sound from GTA's big sound containers. | This function plays a sound from GTA's big sound containers. |
Revision as of 07:04, 22 August 2013
This function plays a sound from GTA's big sound containers.
Syntax
sound playSFX ( string containerName, int bankId, int soundId [, looped = false] )
Required Arguments
- containerName: The name of the audio container. Possible values are: "feet", "genrl", "pain_a", "script", "spc_ea", "spc_fa", "spc_ga", spc_na", "spc_pa"
- bankId: The audio bank Id
- soundId: The sound Id within the audio bank
Optional Arguments
- looped: A boolean representing whether the sound will be looped
Returns
Returns a sound element if the sound was successfully created, false otherwise.
Example
The following example plays a firealarm sound (looped).
if not playSFX("script", 7, 1, true) then outputChatBox("You have to install some missing audio files to hear the sound") end
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd