Every GE hook with signatures and descriptions — lifecycle, per-frame, vehicle, physics, world, input, and file system hooks.
This is the complete list of hooks your GE extension can subscribe to. Define a matching function on your M table to receive any of these events.
:::tip[How hooks work]
Define local function onVehicleSpawned(vid, vehObj) end and export it as M.onVehicleSpawned = onVehicleSpawned. The engine calls it automatically when a vehicle spawns.
:::
local M = {}-- Subscribe to any hook by exporting a function with that namelocal function onVehicleSpawned(vid, vehObj) log('I', 'myext', 'Vehicle spawned: ' .. tostring(vid))endlocal function onWorldReadyState(state) if state == 2 then -- World fully loaded, safe to do work endendM.onVehicleSpawned = onVehicleSpawnedM.onWorldReadyState = onWorldReadyStatereturn M
hookNotify (used by onClientStartMission, onClientEndMission) differs from hook - it processes the "loaded fresh" list immediately, meaning extensions loaded during this hook get their onExtensionLoaded called right away.
All hooks are called in dependency-resolved order.
A hook function returning false does NOT cancel propagation to other extensions (except onExtensionLoaded which aborts loading of THAT extension).