- Available Hooks — FLHook Hooks
- Core Plugin System Functions
- FLServer Hooks
- 1. Server Lifecycle
- 2. Player: connection, login, character selection
- 3. Player: launch, docking, transitions
- 4. Chat and user commands
- 5. Admin commands
- 6. Combat and damage
- 7. Economy and items
- 8. Player trading
- 9. Movement and control
- 10. Navigation & missions
- 11. Mining & objects
- 12. Core systems
- FLHook Callbacks
- Most Useful Hooks
If a required hook is missing for a specific FLServer function, historically it was suggested to discuss it on the FLHook Plugin Version board at the-starport.net.
Below is a list of available hooks in the current FLHook version.
Note
If no calling convention is specified, the default is:
__cdeclPLUGIN_RETURNCODE *Get_PluginReturnCode()Controls what FLHook should do after your plugin is executed.
Important
This function does NOT need to be registered as a hook.
list<PLUGIN_INFO>* Get_PluginInfo()Returns plugin metadata and replaces old .ini registration.
Important
This function does NOT need to be registered as a hook.
void Plugin_Communication_CallBack(PLUGIN_MESSAGE msg, void* data)Callback for inter-plugin communication.
Hooks tied to FLServer internal events and functions.
Called when server shuts down.
Called when server starts (before loading player data).
Called after full initialization.
Runs every server tick.
Used for:
- timers
- periodic checks
- continuous logic
Triggered when client connects.
Triggered on login.
Important: plugins are called after Login
Use OnConnect if you need logic before login.
Character selection event.
Character creation and deletion.
Triggered on player disconnect.
Ship launch into space.
Launch finished.
Dock / undock.
System jump completed.
Leaving system.
Allows overriding spawn position.
Used for:
- teleport
- custom undock
- mobile bases
Intercepts chat messages.
Used for:
- custom commands
- filtering
- logging
- anti-spam
Main hook for adding custom commands.
Return true if handled.
Custom help output.
Add custom admin commands.
Return true if handled.
Extend admin help.
Triggered on weapon fire.
Triggered on ship destruction.
One of the most useful hooks.
Control PvP damage safely.
HkCb_AddDmgEntryMissileTorpHitGeneralDmg
ReqChangeCashReqSetCash
GFGoodBuyGFGoodSell
ReqAddItemReqModifyItemReqRemoveItem
ReqEquipment
JettisonCargoTractorObjectsSPScanCargo
Full control over trading:
- initiate
- accept
- modify
- cancel
- equipment
- cruise
- thrusters
- targeting
- maneuvers
- weapon groups
Item usage.
Handles:
- pathfinding
- stats
- UI
- missions
Mining control hook.
- projectile collisions
- object updates
GoTradelaneStopTradelane
HkCb_Dock_Call — one of the most powerful hooks.
Used for:
- custom docking
- restrictions
- distance checks
- mobile docking
- global time
- simulation loop
Runs every second.
Perfect for:
- timers
- delayed logic
- cleanup
Customize death messages.
Reset player state.
Reload configs (rehash).
Triggered when a base is destroyed.
- PlayerLaunch
- BaseEnter / Exit
- Login
- Disconnect
- UserCmd_Process
- ExecuteCommandString
- ShipDestroyed
- AllowPlayerDamage
- GFGoodBuy / Sell
- ReqEquipment
- Dock_Call
- LaunchPosHook
- MineAsteroid
- TimerCheckKick