GetPlayerVoiceRangePreset
getPlayerVoiceRangePreset
Returns the player's authoritative proximity-range preset.
Syntax
string|false getPlayerVoiceRangePreset(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns whisper, normal, shout, or custom; returns false for an invalid player.
Examples
Read the range preset:
local preset = getPlayerVoiceRangePreset(playerId)
if preset then
outputDebugString(preset)
end
Notes
- Available only in server-side resource scripts.
- Preset distances are configured by the server rather than hard-coded in resources.