OnClientSoundStopped

From Multi Theft Auto: Wiki
Revision as of 22:06, 22 February 2012 by OpenIDUser34 (talk | contribs) (Created page with "{{Client_Function}} test example until properly documented <syntaxhighlight lang="lua"> function onSoundStopped ( reason ) if ( source == currentTrack ) then if ( reason == "destroyed" ) t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

test example until properly documented

function onSoundStopped ( reason )
	if ( source == currentTrack ) then
		if ( reason == "destroyed" ) then
			outputChatBox ( "sound destroyed" )
		elseif ( reason == "finished" ) then
			outputChatBox ( "end of sound" )
		elseif ( reason == "paused" ) then
			outputChatBox ( "sound paused" )
		end
	end
end
addEventHandler ( "onClientSoundStopped", getRootElement(), onSoundStopped )

See Also

Client sound events


Client event functions