1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00
This commit is contained in:
Hellss
2021-08-04 23:24:28 +03:00
parent ae3ea351dc
commit d397ba82f6

View File

@@ -427,17 +427,17 @@ concommand.Add("metrostroi_wire_reset", function(ply, _, args)
if #trainList > 0 then if #trainList > 0 then
if IsValid(ply) 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!") 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 ") print(tostring(ply).." reset "..(args[1] and args[1].." wire " or "").."outside power in train ")
else else
print("Reset outside power in trains ") print("Reset outside power in trains ")
end end
if args[1] then if args[1] then
for _,v in pairs(trainList) do v.TrainWireOutside[tonumber(args[1])] = nil end for _,v in pairs(trainList) do v.TrainWireOutside[tonumber(args[1])] = nil end
else else
for _,v in pairs(trainList) do v.TrainWireOutside = {} end for _,v in pairs(trainList) do v.TrainWireOutside = {} end
end end
else else
if IsValid(ply) then if IsValid(ply) then
ply:PrintMessage(HUD_PRINTCONSOLE,"You must be inside a train!") ply:PrintMessage(HUD_PRINTCONSOLE,"You must be inside a train!")