mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
Merge pull request #1004 from GurraG004/patch-1
feat(es_extended/server/functions.lua): "merge" args type in ESX.RegisterCommand
This commit is contained in:
@@ -100,6 +100,14 @@ function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion)
|
||||
end
|
||||
elseif v.type == 'any' then
|
||||
newArgs[v.name] = args[k]
|
||||
elseif v.type == 'merge' then
|
||||
local lenght = 0
|
||||
for i = 1, k-1 do
|
||||
lenght = lenght + string.len(args[i]) +1
|
||||
end
|
||||
local merge = table.concat(args, " ")
|
||||
|
||||
newArgs[v.name] = string.sub(merge, lenght)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user