Server Callbacks
Allows for callbacks initiated from the client used to return information to a client from the server.
TriggerServerCallback(name, callback, ...)
TriggerServerCallback(name, callback, ...)
Triggers a callback to the server. This callback must be registered on the server-side before it is called.
name* (string) - uniquely identifying name of the callback
callback* (function) - callback function
... (any) - additional arguments to pass to the server
* = required arguments
Example (paired with the server-side example):
FOM.TriggerServerCallback('test', function(s, n)
print(s)
print(n)
end, 'hello', 'there')
See Server Callbacks on the server-side for registering a callback.
Reference: utils/cl_callback.lua
Last updated