OnClientSoundStarted: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client_Function}} test example until properly documented <syntaxhighlight lang="lua"> function onSoundStarted ( reason ) if ( source == currentTrack ) then if ( reason == "play" ) then ...")
(No difference)

Revision as of 22:05, 22 February 2012

test example until properly documented

function onSoundStarted ( reason )
	if ( source == currentTrack ) then
		if ( reason == "play" ) then
			outputChatBox ( "sound started" )
		elseif ( reason == "resumed" ) then
			outputChatBox ( "sound resumed" )
		end
	end
end
addEventHandler ( "onClientSoundStarted", getRootElement(), onSoundStarted )

See Also

Client sound events


Client event functions

Shared