setInteriorSoundsEnabled | Multi Theft Auto: Wiki Skip to content

setInteriorSoundsEnabled

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function disables or enables the ambient sounds played by GTA in most interiors, like restaurants, casinos, clubs, houses, etc.

Syntax

setInteriorSoundsEnabled ( )

Code Examples

server

This example disables the dancing club ambient music, without disabling other interiors' ambient sounds.

function disableClubMusic()
if getElementInterior(localPlayer) == 17 and getDistanceBetweenPoints3D(493.39, -22.72, 1000.68, getElementPosition(localPlayer)) < 50 and getInteriorSoundsEnabled() then
setInteriorSoundsEnabled(false)
elseif not getInteriorSoundsEnabled() then
setInteriorSoundsEnabled(true)
end
end
addEventHandler("onClientPreRender", root, disableClubMusic)

See Also

World Functions