GetInteriorSoundsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (This function is shared)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Shared function}}


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


==Example==
==Example==
Command check_sounds checks if the interior sounds enabled or not
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
addCommandHandler("check_sounds",
addCommandHandler("check_sounds",

Latest revision as of 23:11, 29 April 2024

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

Shared