SetAmbientSoundEnabled

From Multi Theft Auto: Wiki
Revision as of 08:40, 7 September 2019 by Qaisjp (talk | contribs) (replace note)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 : 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