Don't: show the next cmd in array

This commit is contained in:
Coder12a 2019-12-31 22:02:48 -06:00
parent 78e6d54576
commit ea15d7ef6f

View File

@ -126,11 +126,14 @@ end
function factions.register_command(cmd_name, cmd) function factions.register_command(cmd_name, cmd)
local cmd_type = type(cmd_name) local cmd_type = type(cmd_name)
local next = false
if cmd_type == "string" then if cmd_type == "string" then
register_command(cmd_name, cmd) register_command(cmd_name, cmd)
elseif cmd_type == "table" then elseif cmd_type == "table" then
for k, v in pairs(cmd_name) do for k, v in pairs(cmd_name) do
cmd.dont_show_in_help = next
register_command(v, cmd) register_command(v, cmd)
next = true
end end
end end
end end