FreezePlayer
Jump to navigation
Jump to search
freezePlayer
Prevents a connected player from moving until explicitly unfrozen.
Syntax
bool freezePlayer(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns true when the authoritative freeze request is accepted; otherwise returns false.
Examples
Freeze a player for three seconds:
freezePlayer(playerId)
setTimer(function(id)
unfreezePlayer(id)
end, 3000, 1, playerId)
Notes
- Available only in server-side resource scripts.
- The freeze state is sent through the reliable player-control channel.
- Use
unfreezePlayerto release the player.