mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-21 10:38:35 +00:00
refactor: remove modules system and fix indentation
Setting a "standard" module and resource structure is too limiting, so stick to import only.
This commit is contained in:
1 parent
f72665b197
commit
ab4807fee0
6 files changed
+72
-119
No files matched your search
@@ -1,16 +1,14 @@
|
||||
local ServerCallbacks = {}
|
||||
|
||||
local ServerCallback = {
|
||||
Register = function(name, callback)
|
||||
name = ('__cb_%s:%s'):format(GetCurrentResourceName(), name)
|
||||
Register = function(name, callback)
|
||||
name = ('__cb_%s:%s'):format(GetCurrentResourceName(), name)
|
||||
|
||||
RegisterServerEvent(name, function(...)
|
||||
local source = source
|
||||
callback(source, function(...)
|
||||
TriggerClientEvent(name, source, ...)
|
||||
end, ...)
|
||||
end)
|
||||
end
|
||||
RegisterServerEvent(name, function(...)
|
||||
local source = source
|
||||
callback(source, function(...)
|
||||
TriggerClientEvent(name, source, ...)
|
||||
end, ...)
|
||||
end)
|
||||
end
|
||||
}
|
||||
|
||||
return ServerCallback
|
||||
Reference in new issue
Block a user