Merge pull request #1357 from KeeganAI/patch-3

fix(es_extended/server/functions.lua): fixed mistyped variable
This commit is contained in:
Gellipapa
2024-05-30 19:45:33 +02:00
committed by GitHub
+3 -3
View File
@@ -124,13 +124,13 @@ function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion)
elseif v.type == "any" then
newArgs[v.name] = args[k]
elseif v.type == "merge" then
local lenght = 0
local length = 0
for i = 1, k - 1 do
lenght = lenght + string.len(args[i]) + 1
length = length + string.len(args[i]) + 1
end
local merge = table.concat(args, " ")
newArgs[v.name] = string.sub(merge, lenght)
newArgs[v.name] = string.sub(merge, length)
elseif v.type == "coordinate" then
local coord = tonumber(args[k]:match("(-?%d+%.?%d*)"))
if not coord then