function RSGCore.Functions.TriggerCallback(name, cb, ...)
RSGCore.ServerCallbacks[name] = cb
TriggerServerEvent('RSGCore:Server:TriggerCallback', name, ...)
end
-- Example
RSGCore.Functions.TriggerCallback('callbackName', function(result)
print('I got this from the CreateCallBack --> '..result)
end, 'my_parameter_name')
RSGCore.Functions.CreateCallback
Creates a callback which is used on the client-side code with RSGCore.Functions.TriggerCallback
function RSGCore.Functions.CreateCallback(name, cb)
RSGCore.ServerCallbacks[name] = cb
end
-- Example
RSGCore.Functions.CreateCallback('callbackName', function(source, cb)
cb('Ok')
end)