From 2eac900202cc2588d23649ebd83d63dc091e5fc3 Mon Sep 17 00:00:00 2001 From: Fores <64091692+GurraG004@users.noreply.github.com> Date: Sun, 2 Apr 2023 23:00:14 +0200 Subject: [PATCH] Merge Args in command added so you can merge the args for reports command and other functions when you are sending a message with spaces. Needs to be the last args and validate set to false. / Fores --- [core]/es_extended/server/functions.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 202e1b5e..b68dc327 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -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