Callbacks
Accessing the Module
local CALLBACKS <const> = exports.boii_utils:get("modules.callbacks")Server
register_callback(name, cb)
Parameters
Name
Type
Description
Example
CALLBACKS.register("get_server_time", function(source, data, cb)
local response = {
unix = os.time(),
hour = GetClockHours()
}
cb(response)
end)Client
trigger_callback(name, data, cb)
Parameters
Name
Type
Description
Example
Last updated