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

Anonymous functions

Functions that don't have a class and are called like func().

Useful functions for dealing with functions/hooks.

Example

ClassClbk

local clbk = ClasClbk(self, "MyCallback", 1,2,3)
local clbk2 = ClassClbk(OtherClass, "CallMe", "hey")

SimpleClbk

local clbk = SimpleClbk(clbkFunc, 1,2)
local clbk2 = SimpleClbk(SomeClass.Func, self, 3)

Last updated