From d397ba82f6cde282e656f6caf05196ac159fcfbc Mon Sep 17 00:00:00 2001 From: Hellss Date: Wed, 4 Aug 2021 23:24:28 +0300 Subject: [PATCH] . --- lua/metrostroi/sv_util.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/metrostroi/sv_util.lua b/lua/metrostroi/sv_util.lua index bfc2a66..417b368 100644 --- a/lua/metrostroi/sv_util.lua +++ b/lua/metrostroi/sv_util.lua @@ -427,17 +427,17 @@ concommand.Add("metrostroi_wire_reset", function(ply, _, args) if #trainList > 0 then if IsValid(ply) then - if args[1] and not tonumber(args[1]) then ply:PrintMessage(HUD_PRINTCONSOLE,"Argument must be a number") return end + if args[1] and not tonumber(args[1]) then ply:PrintMessage(HUD_PRINTCONSOLE,"Argument must be a number") return end ply:PrintMessage(HUD_PRINTCONSOLE,"reset "..(args[1] and args[1].." " or "").."wire outside power in train!") print(tostring(ply).." reset "..(args[1] and args[1].." wire " or "").."outside power in train ") else print("Reset outside power in trains ") end - if args[1] then - for _,v in pairs(trainList) do v.TrainWireOutside[tonumber(args[1])] = nil end - else - for _,v in pairs(trainList) do v.TrainWireOutside = {} end - end + if args[1] then + for _,v in pairs(trainList) do v.TrainWireOutside[tonumber(args[1])] = nil end + else + for _,v in pairs(trainList) do v.TrainWireOutside = {} end + end else if IsValid(ply) then ply:PrintMessage(HUD_PRINTCONSOLE,"You must be inside a train!")