SetAmbientSoundEnabled

From Multi Theft Auto: Wiki

Jump to: navigation, search

Note: See Also: setWorldSoundEnabled

This function allows you to disable some background sound effects.

Syntax

Required Arguments

  • theType: The type of ambient sound to toggle. Can be either "gunfire" or "general".
  • enable : Set false to turn off, true to turn on

Returns

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

Example

This example turns off the ambient water and gunfire sounds:

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

See Also

FROM VERSION 1.3.1 r5000 ONWARDS
FROM VERSION 1.3.1 r5063 ONWARDS