lib.callbacks.register(name, cb)| Parameters | name — string; cb — function |
| Returns | nothing (invalid args ignored) |
When clients invoke this name, the handler runs as cb(source, …) — the invoking player’s source is always first.
lib.callbacks.register('getPing', function(source)
return GetPlayerPing(source)
end)When the server invokes this name, the handler runs as cb(…) — no source parameter.
lib.callbacks.register('notify', function(msg)
print(msg)
end)