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

Function

setWorldSoundEnabled

Stores muting of world sounds by groups and indexes (e.g. group 0 = people, 5 = birds). Index -1 means the whole group; a two-argument call (group, enabled) also affects the whole group.

Syntax

bool setWorldSoundEnabled(int group, bool enabled [, int index = -1])

Arguments

groupint
Sound group number.
indexint, optional = -1
Sound index in the group, or -1 = whole group.
enabledbool
false = mute, true = restore.

Differences from MTA:SA

  • These MTA:SA arguments are not here: bool immediate = false

In MTA:SA

setWorldSoundEnabled(int group, int index = -1, bool enable, bool immediate = false)

Returns

true on success.

Example

setWorldSoundEnabled(5, false)

Notes

State for scripts. The game audio does not change; use the playSound functions for your own sounds.

See also