Garry's Mod Wiki

Revision Difference

GM:Think#560159

<function name="Think" parent="GM" type="hook"> <description> Called every frame on client and server. This will be the same as <page>GM:Tick</page> on the server when there is no lag, but will only be called once every processed server frame during lag. Called every frame. This will be the same as <page>GM:Tick</page> on the server when there is no lag, but will only be called once every processed server frame during lag. See <page>GM:Tick</page> for a hook that runs every tick on both the client and server. ⤶ <note>This hook **WILL NOT** run if the server is empty, unless you set the <page>ConVar</page> `sv_hibernate_think` to 1</note>⤶ ⤶ <note>On server, this hook **WILL NOT** run if the server is empty, unless you set the <page>ConVar</page> `sv_hibernate_think` to `1`.</note>⤶ </description> <realm>Shared</realm>⤶ <realm>Shared and Menu</realm>⤶ </function> <example> <code> hook.Add( "Think", "MyCoolThinkFunction", function() -- Do something every frame/tick end ) </code> </example>