callback.add

allows lua functions to run inside of selective c++ functions

available functions:

main

read_thread

gui

"read_thread" is looped every 500ms

perfect for:

  • reading not constantly updating memory (player names, map name, etc...)

  • entity cache

"main" has no sleep

perfect for:

  • reading constantly updating memory (player positions, health, viewangles, etc...)

  • rendering

"gui" is of course for gui calls, however it works the same as "main" so you could read memory here but it is not recommended

-- usage 1:
callback.add("main", function()
    -- your function code here
end)

-- usage 2:
local function my_awesome_function()
    -- your function code here
end

callback.add("main", my_awesome_function)

argument types: (string, function)

Last updated