- Documentation
- Client functions
- getVoicePushToTalkKey
Function
getVoicePushToTalkKey
Returns the local player's talk key: their own from the ESC menu or, if they did not pick one, the server's default key. The second value is a name to show on screen.
Syntax
string, string getVoicePushToTalkKey()Returns
The key name (as in bindKey) and its label, e.g. "z", "Z".
Example
local key, label = getVoicePushToTalkKey()
outputChatBox("Aby mówić, przytrzymaj " .. label)
See also
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.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.