- Documentation
- Server functions
- setVoiceSettings
Function
setVoiceSettings
Changes several voice chat settings at once. The others stay unchanged. If any value is bad, nothing is changed.
Syntax
bool setVoiceSettings(table settings)Arguments
settingstable- A name = value table, as in
getVoiceSettings.
Returns
true on success.
Example
setVoiceSettings({ mode = "channels", range = 30, falloff = "linear" })
See also
setVoiceSettingChanges one voice chat setting. The change takes effect immediately for all players. Names and ranges are the same as ingetVoiceSettings; numbers out of range are clamped (e.g.range500 gives 250).pushToTalkKeyis a key name like inbindKey("z","lalt","mouse4","f5") and is only the default key: a player who picked their own in the ESC menu keeps it.getVoiceSettingsReturns all of the server's voice chat settings as a table. Keys:enabled,mode("proximity"– heard nearby,"global"– everyone hears everyone,"channels"– nearby plus channels),range(range in metres, 3–250, default 40),minDistance(up to this distance the voice has full volume, default 2),falloff(volume drop with distance:"linear","inverse","exponential"),wallDamping(damping through walls 0–1, default 0.75),pushToTalk,pushToTalkKey(default talk key,"z"),bitrate(quality in kb/s, 8–64, default 32),occlusion,reverb,vehicleMuffle(muffled inside a closed car),indicator(icon above the speaker) andmutedByDefault(new players are muted). The client gets the same table as the server.