OnClientSoundStarted

From Multi Theft Auto: Wiki
Revision as of 22:56, 27 September 2014 by MeowCola (talk | contribs)
Jump to navigation Jump to search

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


Client event functions