Lua Hooks Order
This page shows the order of hooks calls.
The list is generated on base gamemode with
-noaddons
. The list starts from the first called hook till the last without any user/server activity. Only first hook call is recorded.Client
- GM:CreateTeams
- GM:PreGamemodeLoaded
- GM:OnGamemodeLoaded - Good hook to create custom vgui elements.
- GM:PopulateMenuBar
- GM:CloseDermaMenus
- GM:ForceDermaSkin
- GM:PostGamemodeLoaded
- GM:Initialize
- GM:HUDShouldDraw
- GM:DrawOverlay
- GM:Tick
- GM:PlayerClassChanged
- GM:OnEntityCreated
- GM:NotifyShouldTransmit
- GM:InitPostEntity - Starting from this hook LocalPlayer returns valid player.
- GM:StartCommand
- GM:CreateMove
- GM:CalcView
- GM:AdjustMouseSensitivity
- GM:CalcMainActivity
- GM:TranslateActivity
- GM:UpdateAnimation
- GM:NetworkEntityCreated
- Render Hooks (Render Order)
- GM:Think
- GM:InputMouseApply
- GM:SetupMove
- GM:PlayerTick
- GM:Move
- GM:FinishMove
- GM:PlayerPostThink
- GM:DoAnimationEvent
- HUD Hooks (HUD Render Order)
Server
- GM:CreateTeams
- GM:PreGamemodeLoaded
- GM:OnGamemodeLoaded
- GM:PostGamemodeLoaded
- GM:Initialize
- GM:OnEntityCreated
- GM:EntityKeyValue
- GM:EntityRemoved
- GM:InitPostEntity - Good hook to create new entities. (You're still able to spawn them, but
worldspawn
won't be valid) - GM:GetGameDescription - Starting from this hook clients are able to connect the server.
- GM:Think
- GM:Tick
- GM:AcceptInput
- GM:EntityEmitSound