Garry's Mod Wiki

Revision Difference

Player:Freeze#512599

<function name="Freeze" parent="Player" type="classfunc">⤶ <description>⤶ Freeze the player. Frozen players cannot move, look around, or attack. Key bindings are still called. Similar to <page>Player:Lock</page> but the player can still take damage.⤶ ⤶ Adds or removes the [FL_FROZEN](/gmod/Enums/FL) flag from the player.⤶ ⤶ <bug>Frozen bots will still be able to look around.</bug>⤶ </description>⤶ <realm>Server</realm>⤶ <file line="237-L249">lua/includes/extensions/player.lua</file>⤶ <args>⤶ <arg name="frozen" type="boolean" default="false">Whether the player should be frozen.</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>Freezes all players</description>⤶ <code>⤶ for k, v in pairs(player.GetAll()) do⤶ v:Freeze( true )⤶ end⤶ </code>⤶ ⤶ </example>