mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
feat!: ace permission system
This commit is contained in:
+1
-3
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user