HU/playSFX3D: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0134|1.3.4|5731| This function plays a sound in the GTA world from GTA's big sound containers. }} {{Note|There is a tool a...") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function hu}} | ||
{{New feature/item|3.0134|1.3.4|5731| | {{New feature/item|3.0134|1.3.4|5731| | ||
This function plays a sound in the GTA world from GTA's big sound containers. | This function plays a sound in the GTA world from GTA's big sound containers. | ||
Line 63: | Line 63: | ||
==See Also== | ==See Also== | ||
{{Client_audio_functions}} | {{Client_audio_functions hu}} | ||
[[en:playSFX3D]] | [[en:playSFX3D]] |
Revision as of 21:27, 19 July 2018
This function plays a sound in the GTA world from GTA's big sound containers.
Syntax
element playSFX3D ( string containerName, int bankId, int soundId, float x, float y, float z [, bool 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
- x: A floating point number representing the X coordinate on the map.
- y: A floating point number representing the Y coordinate on the map.
- z: A floating point number representing the Z coordinate on the map.
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 fire alarm sound near you (looped).
local x, y, z = getElementPosition(localPlayer) if not playSFX3D("script", 7, 1, x + 10, y, z, true) then outputChatBox("You have to install some missing audio files to hear the sound") end
See Also
- HU/getRadioChannel
- HU/getRadioChannelName
- HU/getSFXStatus
- HU/getSoundBPM
- HU/getSoundEffects
- HU/getSoundFFTData
- HU/getSoundLength
- HU/getSoundLevelData
- HU/getSoundMaxDistance
- HU/getSoundMetaTags
- HU/getSoundMinDistance
- HU/getSoundPan
- HU/getSoundPosition
- HU/getSoundProperties
- HU/getSoundSpeed
- HU/getSoundVolume
- HU/getSoundWaveData
- HU/isSoundPanningEnabled
- HU/isSoundPaused
- HU/playSFX
- HU/playSFX3D
- HU/playSound
- HU/playSound3D
- HU/playSoundFrontEnd
- HU/setRadioChannel
- HU/setSoundEffectEnabled
- HU/setSoundMaxDistance
- HU/setSoundMinDistance
- HU/setSoundPan
- HU/setSoundPanningEnabled
- HU/setSoundPaused
- HU/setSoundPosition
- HU/setSoundProperties
- HU/setSoundSpeed
- HU/setSoundVolume
- HU/stopSound