FreezePlayer: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 32: | Line 32: | ||
* Use <code>unfreezePlayer</code> to release the player. | * Use <code>unfreezePlayer</code> to release the player. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
[[Category:Spatial Functions]] | [[Category:Spatial Functions]] | ||
Latest revision as of 09:52, 15 August 2026
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.