Merge branch 'main' into main

This commit is contained in:
Kakarot
2022-08-25 07:50:45 -07:00
committed by GitHub
2 changed files with 13 additions and 1 deletions
+8 -1
View File
@@ -357,7 +357,14 @@ end
function QBCore.Functions.HasPermission(source, permission)
local src = source
if IsPlayerAceAllowed(src, permission) then return true end
if type(permission) == "string" then
if IsPlayerAceAllowed(src, permission) then return true end
elseif type(permission) == "table" then
for _, permLevel in pairs(permission) do
if IsPlayerAceAllowed(src, permLevel) then return true end
end
end
return false
end