Garry's Mod Wiki

GM:Think

  GM:Think()

Description

Called every frame. This will be the same as GM:Tick on the server when there is no lag, but will only be called once every processed server frame during lag.

See GM:Tick for a hook that runs every tick on both the client and server.

On server, this hook WILL NOT run if the server is empty, unless you set the ConVar sv_hibernate_think to 1.

Example

hook.Add( "Think", "MyCoolThinkFunction", function() -- Do something every frame/tick end )