GetInteriorSoundsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 15: Line 15:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--
addCommandHandler("check_sounds",
function()
if getInteriorSoundsEnabled() then
outputChatBox("Interior sounds are enabled!!!",0,255,0)
else
outputChatBox("Interior sounds are disabled!!!",255,0,0)
end
end)
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Client world functions}}
{{Client world functions}}

Revision as of 21:35, 11 July 2017

Accessories-text-editor.png Script Example Missing Function GetInteriorSoundsEnabled needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


This function checks to see if the music played by default in clubs is disabled or not.

Syntax

bool getInteriorSoundsEnabled ( )

Returns

Returns true if music is playing, returns false if music is not playing.

Example

addCommandHandler("check_sounds",
function()
	if getInteriorSoundsEnabled() then 
		outputChatBox("Interior sounds are enabled!!!",0,255,0)
	else
		outputChatBox("Interior sounds are disabled!!!",255,0,0) 
	end
end)

See Also