GetInteriorSoundsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Correction.)
 
(7 intermediate revisions by 3 users not shown)
Line 11: Line 11:
==Returns==
==Returns==
Returns true if music is playing, returns false if music is not playing.
Returns true if music is playing, returns false if music is not playing.
==Example==
Command check_sounds checks if the interior sounds enabled or not
<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>


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

Latest revision as of 21:46, 11 July 2017

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

Command check_sounds checks if the interior sounds enabled or not

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