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
| Name | Type | Description |
|---|---|---|
| group | int | The sounds' group (SA's bank slot). |
| index | int | One sound in the group, from 0 to 255. It can be left out for the whole group.default -1 |
| enabled | bool | true to let it play, false to silence it. |
| immediate | bool | When 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)