1
0
Fork 0
forked from Simnation/Main
Main/resources/[standalone]/ox_lib/resource/client.lua

28 lines
825 B
Lua
Raw Normal View History

2025-06-07 08:51:21 +02:00
--[[
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)