SetPlayerVoiceRange
Jump to navigation
Jump to search
setPlayerVoiceRange
Sets a custom proximity voice range for a player.
Syntax
bool setPlayerVoiceRange(int playerId, number range)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
range |
number |
yes | A finite positive range in metres. |
Returns
Returns true when the value was accepted; otherwise returns false.
Examples
Use a 12 metre custom range:
setPlayerVoiceRange(playerId, 12)
Notes
- Available only in server-side resource scripts.
- The server clamps the effective value to its configured minimum and maximum.
- Calling this function changes the player's range preset to
custom.