Skip to main content

RegisterServerCallback

Used to create server callbacks.

Parameters​

NameParameter
nameThe name of the callback (to be used from the client to invoke this callback)
cbA function reference to execute when this callback is invoked

Return Type​

Void

Invoke​

local framework = exports["ssdev_framework"]:GetFramework()
framework:RegisterServerCallback(name, cb)

Example​

local framework = exports["ssdev_framework"]:GetFramework()
framework:RegisterServerCallback("MyServerCallback", function(source, cb, ...)
print("You have triggered MyServerCallback")
end)

Please see the client "TriggerServerCallback" function for more information on executing this callback from the client.