mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
.
This commit is contained in:
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user