Hooks
Updated for version 3.38
This page assumes you already have some knowledge in lua and payday 2 lua structure. The functions like almost everywhere are class functions so you'd call them like Hooks:QuickClass(...)
Hooks
Already an existing class in BLT. BeardLib adds a few useful functions to it. https://payday-2-blt-docs.readthedocs.io/en/latest/lua/hooks/
Functions
Function | Description |
---|---|
RemovePostHookWithObject(Table object, String id) | Removes a post hook with the id |
RemovePreHookWithObject(object, id) | Removes a pre hook with the id |
QuickClass(hooks_name) | Returns a class that has functions for quicker hooking. |
LazyClass(object, hooks_name) | Like |
Anonymous functions
Functions that don't have a class and are called like func().
Useful functions for dealing with functions/hooks.
Function | Description |
---|---|
ClassClbk(Table clss, String func, a, b, c, ...) | A replacement for the function |
SimpleClbk(Funciton f, a, b, c, ...) | Like |
SafeClbk(...) | Same as |
SafeClassClbk(...) | Same as |
Example
ClassClbk
SimpleClbk
Last updated