fix createCallback complaining on client side

This commit is contained in:
Jim Shield
2025-03-07 13:29:43 +00:00
committed by GitHub
parent c947993e9e
commit daa9dca142

View File

@@ -13,6 +13,7 @@
--- end) --- end)
--- ``` --- ```
function createCallback(callbackName, funct) function createCallback(callbackName, funct)
if isServer() then
if isStarted(OXLibExport) then if isStarted(OXLibExport) then
lib.callback.register(callbackName, funct) lib.callback.register(callbackName, funct)
else else
@@ -31,6 +32,7 @@ function createCallback(callbackName, funct)
end end
end end
end end
end
--- Triggers a server callback and returns the result. --- Triggers a server callback and returns the result.
--- ---