forked from overextended/ox_lib
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient.lua
More file actions
27 lines (22 loc) · 885 Bytes
/
client.lua
File metadata and controls
27 lines (22 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--[[
https://github.com/overextended/ox_lib
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
Copyright © 2025 Linden <https://github.com/thelindat>
]]
local _registerCommand = RegisterCommand
---@param commandName string
---@param callback fun(source, args, raw)
---@param restricted boolean?
function RegisterCommand(commandName, callback, restricted)
_registerCommand(commandName, function(source, args, raw)
if not restricted or lib.callback.await('er_lib:checkPlayerAce', 100, ('command.%s'):format(commandName)) then
callback(source, args, raw)
end
end)
end
RegisterNUICallback('getConfig', function(_, cb)
cb {
primaryColor = GetConvar('er:primaryColor', GetConvar('ox:primaryColor', 'blue')),
primaryShade = GetConvarInt('er:primaryShade', GetConvarInt('ox:primaryShade', 8)),
}
end)