M MY Multiplayer: Wiki
Side
Kind

setWorldSoundEnabled

Client

Turns the game world's sounds (footsteps, gunfire, collisions and more) on or off by group or one by one.

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

Parameters

NameTypeDescription
groupintThe sounds' group (SA's bank slot).
indexintOne sound in the group, from 0 to 255. It can be left out for the whole group.default -1
enabledbooltrue to let it play, false to silence it.
immediateboolWhen turning off, also stop the group's sounds that are already playing.default false

Returns

Always true.

Use showSound to find the group and index of a sound as it plays.

Example

setWorldSoundEnabled(5, false, true)
setWorldSoundEnabled(40, 3, false)

See also