Player.Freeze
From GMod Wiki
| Function | |
| Syntax |
Player.Freeze( Boolean state ) Where is this used? |
| Description: | |
| Stops players moving or firing, keypresses are still called | |
| Returns: | nil |
| Part of Library: | Player |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.Freeze]Player.Freeze [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | This example will freeze all players. |
|---|---|
| Used on | |
| Code | for _, ply in ipairs( player.GetAll() ) do ply:Freeze( true ) end |
| Output | N/A |
Additional Notes
- Pass true to freeze, false to unfreeze.
- Even though this is shared, it only freezes your view when used clientside. Jumping reverts this.
- If the player kills themselves or retries, they'll break free.
- The player can still be acted upon by forces outside his control, like gravity and physical interaction.