From 62dd12a4d9f200436231bc1b167a0ed3ba6e0f8d Mon Sep 17 00:00:00 2001 From: Kakarot <57848836+GhzGarage@users.noreply.github.com> Date: Sun, 10 Apr 2022 23:00:42 -0500 Subject: [PATCH] Update callcommand permission check --- server/events.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/events.lua b/server/events.lua index 745a4fa..1c7c6b3 100644 --- a/server/events.lua +++ b/server/events.lua @@ -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')