mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(addCommand): Allow multiple groups (#57)
This commit is contained in:
@@ -90,7 +90,13 @@ local function addCommand(group, name, callback, parameters, help)
|
||||
end, group and true)
|
||||
|
||||
name = ('command.%s'):format(name)
|
||||
if not IsPrincipalAceAllowed(group, name) then lib.addAce(group, name) end
|
||||
if type(group) == 'table' then
|
||||
for _, v in ipairs(group) do
|
||||
if not IsPrincipalAceAllowed(v, name) then lib.addAce(v, name) end
|
||||
end
|
||||
else
|
||||
if not IsPrincipalAceAllowed(group, name) then lib.addAce(group, name) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user