setAmbientSoundEnabled | Multi Theft Auto: Wiki Skip to content

setAmbientSoundEnabled

Client-side
Server-side
Shared

Manual Review Required

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


This function allows you to disable some background sound effects. See also: setWorldSoundEnabled.

Syntax

bool setAmbientSoundEnabled ( string theType, bool enable )
Required Arguments
  • theType: The type of ambient sound to toggle. Can be either "gunfire" or "general".
  • enable: MISSING_PARAM_DESC

Returns

  • bool: value

Returns true if the ambient sound was set correctly, false if invalid values were passed.

Code Examples

shared

This example turns off the ambient water and gunfire sounds:

setAmbientSoundEnabled( "general", false )
setAmbientSoundEnabled( "gunfire", false )

See Also

World Functions