mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Update callcommand permission check
This commit is contained in:
+1
-1
@@ -189,7 +189,7 @@ RegisterNetEvent('QBCore:CallCommand', function(command, args)
|
||||
if not QBCore.Commands.List[command] then return end
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
if not Player then return end
|
||||
local hasPerm = QBCore.Functions.HasPermission(src, QBCore.Commands.List[command].permission)
|
||||
local hasPerm = QBCore.Functions.HasPermission(src, "command."..QBCore.Commands.List[command].name)
|
||||
if hasPerm then
|
||||
if QBCore.Commands.List[command].argsrequired and #QBCore.Commands.List[command].arguments ~= 0 and not args[#QBCore.Commands.List[command].arguments] then
|
||||
TriggerClientEvent('QBCore:Notify', src, Lang:t('error.missing_args2'), 'error')
|
||||
|
||||
Reference in New Issue
Block a user