SetAmbientSoundEnabled

From Multi Theft Auto: Wiki
Revision as of 21:24, 30 July 2011 by Ccw (talk | contribs) (Created page with "__NOTOC__ {{Server client function}} This function allows you to disable some background sound effects. ==Syntax== <syntaxhighlight lang="lua"> bool setAmbientSoundEnabled( string type, bool e...")
(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.

Syntax

bool setAmbientSoundEnabled( string type, bool enable )

Required Arguments

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