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

Function

setVoiceSetting

ServerPlayersTrilogy Hub only

Changes one voice chat setting. The change takes effect immediately for all players. Names and ranges are the same as in getVoiceSettings; numbers out of range are clamped (e.g. range 500 gives 250). pushToTalkKey is a key name like in bindKey ("z", "lalt", "mouse4", "f5") and is only the default key: a player who picked their own in the ESC menu keeps it.

Syntax

bool setVoiceSetting(string name, var value)

Arguments

namestring
The setting name.
valuevar
The new value (type matching the setting).

Returns

true on success, false on a bad name or value.

Example

setVoiceSetting("range", 25)
setVoiceSetting("pushToTalkKey", "x")

Notes

Range and minimum distance. If minDistance ends up greater than or equal to range, it is lowered to range - 1.

See also