OnClientSoundStarted: Difference between revisions
Jump to navigation
Jump to search
OpenIDUser34 (talk | contribs) No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Client event}} | {{Client event}} | ||
__NOTOC__ | __NOTOC__ | ||
{{New items|3.0151|1.4| | |||
This event is triggered when a '''sound''' is started. | This event is triggered when a '''sound''' is started. | ||
}} | |||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Revision as of 05:54, 10 May 2012
This event is triggered when a sound is started.
Parameters
string reason
- reason: the reason the sound was started, can be "play" or "resumed".
Source
The source of this event is the sound's element.
Example
This example outputs the reason the sound started .
function onSoundStarted ( reason )
if ( reason == "play" ) then
outputChatBox ( "sound started" )
elseif ( reason == "resumed" ) then
outputChatBox ( "sound resumed" )
end
end
addEventHandler ( "onClientSoundStarted", getRootElement(), onSoundStarted )
);
See Also
Client sound events
- onClientSoundBeat
- onClientSoundChangedMeta
- onClientSoundFinishedDownload
- onClientSoundStarted
- onClientSoundStopped
- onClientSoundStream
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled