ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setAmbientSoundEnabled

Function

setAmbientSoundEnabled

ServerWorldIdentical to MTA:SA

Stores turning ambient sounds on or off: "gunfire" (distant gunshots in dangerous areas) or "general" (other background noises).

Syntax

bool setAmbientSoundEnabled(string theType, bool enabled)

Arguments

theTypestring
"gunfire" or "general".
enabledbool
true = enabled.

Returns

true on success, false for another type.

Example

setAmbientSoundEnabled("gunfire", false)

Notes

State for scripts. The game audio does not change.

See also