HU/playSFX: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
It also returns ''false'' when trying to play a track deleted in the recent GTA: SA Steam patches (and if the client is using a Steam GTA: SA copy).|true}} | It also returns ''false'' when trying to play a track deleted in the recent GTA: SA Steam patches (and if the client is using a Steam GTA: SA copy).|true}} | ||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element playSFX ( string containerName, int bankId, int soundId [, bool looped = false ] ) | element playSFX ( string containerName, int bankId, int soundId [, bool looped = false ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ===Kötelező argumentumok=== | ||
*'''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" | *'''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 | *'''bankId:''' The audio bank id | ||
*'''soundId:''' The sound id within the audio bank | *'''soundId:''' The sound id within the audio bank | ||
=== | ===Tetszőleges Argumentumok=== | ||
*'''looped:''' A [[boolean]] representing whether the sound will be looped | *'''looped:''' A [[boolean]] representing whether the sound will be looped | ||
==Returns== | ==Returns== | ||
Line 27: | Line 27: | ||
{{New feature/item|3.0140|1.4|6443| | {{New feature/item|3.0140|1.4|6443| | ||
== | ==Szintaxis 2== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element playSFX ( string "radio", string radioStation, int trackId [, bool looped = false ] ) | element playSFX ( string "radio", string radioStation, int trackId [, bool looped = false ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ===Kötelező argumentumok=== | ||
*'''radio:''' The string "radio" (used to differentiate to the first syntax) | *'''radio:''' The string "radio" (used to differentiate to the first syntax) | ||
*'''radioStation:''' The radio station. Possible values are "Adverts", "Ambience", "Police", "Playback FM", "K-Rose", "K-DST", "Cutscene", "Beats", "Bounce FM", "SF-UR", "Radio Los Santos", "Radio X", "CSR 103.9", "K-Jah West", "Master Sounds 98.3", "WCTR". | *'''radioStation:''' The radio station. Possible values are "Adverts", "Ambience", "Police", "Playback FM", "K-Rose", "K-DST", "Cutscene", "Beats", "Bounce FM", "SF-UR", "Radio Los Santos", "Radio X", "CSR 103.9", "K-Jah West", "Master Sounds 98.3", "WCTR". | ||
*'''trackId :''' The radio track id within the radio station audio file | *'''trackId :''' The radio track id within the radio station audio file | ||
=== | ===Tetszőleges Argumentumok=== | ||
*'''looped:''' A [[boolean]] representing whether the sound will be looped | *'''looped:''' A [[boolean]] representing whether the sound will be looped | ||
==Returns== | ==Returns== | ||
Line 43: | Line 43: | ||
}} | }} | ||
== | ==Példa== | ||
The following example plays a firealarm sound (looped). | The following example plays a firealarm sound (looped). | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 51: | Line 51: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==Lásd még== | ||
{{Client_audio_functions hu}} | {{Client_audio_functions hu}} | ||
[[en:PlaySFX]] | [[en:PlaySFX]] |
Revision as of 20:36, 19 July 2018
Ez a funkció lejátsza a hangokat a nagy GTA hangkonténerből.
Szintaxis
element playSFX ( string containerName, int bankId, int soundId [, bool looped = false ] )
Kötelező argumentumok
- 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
Tetszőleges Argumentumok
- looped: A boolean representing whether the sound will be looped
Returns
Returns a sound element if the sound was successfully created, false otherwise.
Szintaxis 2
element playSFX ( string "radio", string radioStation, int trackId [, bool looped = false ] )
Kötelező argumentumok
- radio: The string "radio" (used to differentiate to the first syntax)
- radioStation: The radio station. Possible values are "Adverts", "Ambience", "Police", "Playback FM", "K-Rose", "K-DST", "Cutscene", "Beats", "Bounce FM", "SF-UR", "Radio Los Santos", "Radio X", "CSR 103.9", "K-Jah West", "Master Sounds 98.3", "WCTR".
- trackId : The radio track id within the radio station audio file
Tetszőleges Argumentumok
- looped: A boolean representing whether the sound will be looped
Returns
Returns a sound element if the sound was successfully created, false otherwise.
Példa
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
Lásd még
- 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