Skip to main content

Trigger

The standard function for triggering a callback, this can be used on both the client and server. It'll trigger a function once it gets a return from the other end.

Function

local Callbacks = WXSCore.Callbacks
Callbacks(event, cb, ...)

Parameters

NameTypeDescription
eventstringThe name of the callback.
cbfunctionThe function to be called when the callback is triggered.
...anyAny additional arguments to be passed to the callback.

Example

local Callbacks = WXSCore.Callbacks

Callbacks("TestCallback", function(someReturnData)
print("Test callback returned with data: " .. someReturnData)
end, "Some data")