HU/playSFX3D: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
Akkor is ''hamis'' értéked ad vissza, ha egy töröld dalt próbál meg lejátszani a legújabb GTA:SA Steam verziójában (és ha a kliens egy GTA: SA Steam másolatát használja.|true}} | Akkor is ''hamis'' értéked ad vissza, ha egy töröld dalt próbál meg lejátszani a legújabb GTA:SA Steam verziójában (és ha a kliens egy GTA: SA Steam másolatát használja.|true}} | ||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element playSFX3D ( string containerName, int bankId, int soundId, float x, float y, float z [, bool looped = false ] ) | element playSFX3D ( string containerName, int bankId, int soundId, float x, float y, float z [, 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 | ||
Line 24: | Line 24: | ||
*'''z:''' A floating point number representing the Z coordinate on the map. | *'''z:''' A floating point number representing the Z coordinate on the map. | ||
=== | ===Tetszőleges Argumentumok=== | ||
*'''looped:''' A [[boolean]] representing whether the sound will be looped | *'''looped:''' A [[boolean]] representing whether the sound will be looped | ||
== | ==Visszaadott értéks== | ||
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise. | Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise. | ||
{{New feature/item|4.0140|1.4|6443| | {{New feature/item|4.0140|1.4|6443| | ||
== | ==Szintaxis 2== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element playSFX3D( string "radio", string radioStation, int trackId, float x, float y, float z [, bool looped = false ] ) | element playSFX3D( string "radio", string radioStation, int trackId, float x, float y, float z [, 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". | ||
Line 45: | Line 45: | ||
*'''z:''' A floating point number representing the Z coordinate on the map. | *'''z:''' A floating point number representing the Z coordinate on the map. | ||
=== | ===Tetszőleges Argumentumok=== | ||
*'''looped:''' A [[boolean]] | *'''looped:''' A [[boolean]] visszadja, hogy a hang ismétlődő-e | ||
==Returns== | ==Returns== | ||
Visszaad egy [[sound|hang]] elemet, ha a hang sikeresen létre lett hozva, egyébként hamis. | |||
}} | }} | ||
== | ==Példa== | ||
A következő példa lejátsza a tűzoltó hangját a közeledben (ismétlődő). | A következő példa lejátsza a tűzoltó hangját a közeledben (ismétlődő). | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Revision as of 21:34, 19 July 2018
Ez a funkció lejátszik egy hangot a GTA világban a nagy GTA hangkonténerből..
Szintaxis
element playSFX3D ( string containerName, int bankId, int soundId, float x, float y, float z [, 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
- 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.
Tetszőleges Argumentumok
- looped: A boolean representing whether the sound will be looped
Visszaadott értéks
Returns a sound element if the sound was successfully created, false otherwise.
Példa
A következő példa lejátsza a tűzoltó hangját a közeledben (ismétlődő).
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