feat!: ace permission system

This commit is contained in:
BerkieBb
2022-02-24 21:58:49 +01:00
parent 1412d02db1
commit 31888996ab
13 changed files with 195 additions and 72 deletions
+1 -3
View File
@@ -24,10 +24,8 @@ function QBCore.Commands.Refresh(source)
local suggestions = {}
if not Player then return end
for command, info in pairs(QBCore.Commands.List) do
local isGod = QBCore.Functions.HasPermission(source, 'god')
local hasPerm = QBCore.Functions.HasPermission(source, QBCore.Commands.List[command].permission)
local isPrincipal = IsPlayerAceAllowed(source, 'command')
if isGod or hasPerm or isPrincipal then
if hasPerm then
suggestions[#suggestions + 1] = {
name = '/' .. command,
help = info.help,