mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 03:08:52 +00:00
Support table/list of groups when registering commands (#616)
* Support table/list of groups when registering commands * Adhere to "unwritten code standard"
This commit is contained in:
committed by
GitHub
parent
6c70abd5e8
commit
f4558c85e3
@@ -138,7 +138,13 @@ ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion)
|
||||
end
|
||||
end, true)
|
||||
|
||||
ExecuteCommand(('add_ace group.%s command.%s allow'):format(group, name))
|
||||
if type(group) == 'table' then
|
||||
for k,v in ipairs(group) do
|
||||
ExecuteCommand(('add_ace group.%s command.%s allow'):format(v, name))
|
||||
end
|
||||
else
|
||||
ExecuteCommand(('add_ace group.%s command.%s allow'):format(group, name))
|
||||
end
|
||||
end
|
||||
|
||||
ESX.ClearTimeout = function(id)
|
||||
|
||||
Reference in New Issue
Block a user