mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Fix reload
This commit is contained in:
@@ -398,8 +398,8 @@ end
|
|||||||
|
|
||||||
function TOOL:Reload(trace)
|
function TOOL:Reload(trace)
|
||||||
if CLIENT then return end
|
if CLIENT then return end
|
||||||
|
local ply = self:GetOwner()
|
||||||
if IsValid(trace.Entity) and trace.Entity._Settings then
|
if IsValid(trace.Entity) and trace.Entity._Settings then
|
||||||
local ply = self:GetOwner()
|
|
||||||
ply:ConCommand("gmod_tool train_spawner")
|
ply:ConCommand("gmod_tool train_spawner")
|
||||||
ply:SelectWeapon("gmod_tool")
|
ply:SelectWeapon("gmod_tool")
|
||||||
local tool = ply:GetTool("train_spawner")
|
local tool = ply:GetTool("train_spawner")
|
||||||
@@ -411,10 +411,10 @@ function TOOL:Reload(trace)
|
|||||||
net.Start("train_spawner_open")
|
net.Start("train_spawner_open")
|
||||||
net.WriteTable(tool.Settings)
|
net.WriteTable(tool.Settings)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
local spawner = ents.Create("gmod_train_spawner")
|
|
||||||
spawner:SpawnFunction(ply)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local spawner = ents.Create("gmod_train_spawner")
|
||||||
|
spawner:SpawnFunction(ply)
|
||||||
end
|
end
|
||||||
function TOOL:LeftClick(trace)
|
function TOOL:LeftClick(trace)
|
||||||
if not self.Train then return end
|
if not self.Train then return end
|
||||||
|
|||||||
Reference in New Issue
Block a user