onClientSoundStopped
Client-side
Server-side
Shared
This event is triggered when a sound is stopped.
Parameters
string reason
- reason: the reason the sound was stopped, can be "finished", "paused", "destroyed" or "disabled".
Source
element: The source of this event is the sound's element.
Code Examples
client
This example outputs the reason the sound stopped.
function onSoundStopped ( reason ) if ( reason == "destroyed" ) then outputChatBox ( "sound destroyed" ) elseif ( reason == "finished" ) then outputChatBox ( "end of sound" ) elseif ( reason == "paused" ) then outputChatBox ( "sound paused" ) endendaddEventHandler ( "onClientSoundStopped", getRootElement(), onSoundStopped )