SetPlayerVoicePushToTalk
Jump to navigation
Jump to search
setPlayerVoicePushToTalk
Changes whether push-to-talk is required for a player's voice capture.
Syntax
bool setPlayerVoicePushToTalk(int playerId, bool enabled)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
enabled |
bool |
yes | Whether capture requires the configured push-to-talk input. |
Returns
Returns true when the state was accepted; otherwise returns false.
Examples
Require push-to-talk:
setPlayerVoicePushToTalk(playerId, true)
Notes
- Available only in server-side resource scripts.
- This controls policy; the native client owns capture and the actual input binding.