OnClientWorldSound: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Client event}} | {{Client event}} | ||
__NOTOC__ | __NOTOC__ | ||
{{New feature/item|3.0157|1.5.6|14652| | {{New feature/item|3.0157|1.5.6|14652|This event triggers whenever a GTA sound starts playing.}} | ||
This event triggers whenever a GTA sound starts playing. | |||
}} | |||
{{Note|Use [[setWorldSoundEnabled]] if you want to disable certain sounds conditionless. | {{Note|Use [[setWorldSoundEnabled]] if you want to disable certain sounds conditionless. | ||
For example, you should only cancel player emitted sounds in this event, because when you cancel certain vehicle sounds, the game will try to play the same sound on the next frame.}} | For example, you should only cancel player emitted sounds in this event, because when you cancel certain vehicle sounds, the game will try to play the same sound on the next frame.}} | ||
==Parameters== | ==Parameters== | ||
Line 25: | Line 22: | ||
==Example== | ==Example== | ||
{{Example}} | |||
==See Also== | ==See Also== |
Revision as of 12:47, 24 May 2019
This event triggers whenever a GTA sound starts playing.
Parameters
int group, int index, float x, float y, float z
- group: An integer representing the world sound group
- index: An integer representing an individual sound within the group
- 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.
Source
The source of this event is the element, which emitted the sound.
Cancel effect
If this event is canceled, the sound won't play at all.
Example
Script Example Missing Event OnClientWorldSound needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
-- TODO
See Also
World sound functions
Client other events
- onClientChatMessage
- onClientConsole
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMinimize
- onClientMTAFocusChange
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled