forked from Simnation/Main
27 lines
825 B
Lua
27 lines
825 B
Lua
--[[
|
|
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('ox_lib:checkPlayerAce', 100, ('command.%s'):format(commandName)) then
|
|
callback(source, args, raw)
|
|
end
|
|
end)
|
|
end
|
|
|
|
RegisterNUICallback('getConfig', function(_, cb)
|
|
cb({
|
|
primaryColor = GetConvar('ox:primaryColor', 'blue'),
|
|
primaryShade = GetConvarInt('ox:primaryShade', 8)
|
|
})
|
|
end)
|