- Documentation
- Server functions
- setAmbientSoundEnabled
Function
setAmbientSoundEnabled
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".enabledbooltrue= enabled.
Returns
true on success, false for another type.
Example
setAmbientSoundEnabled("gunfire", false)
Notes
State for scripts. The game audio does not change.