1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00
Files
MetrostroiAddon/lua/entities/gmod_train_door/init.lua
g_brzhezinskiy 1d05caf866 init
2021-01-02 12:51:45 +03:00

29 lines
608 B
Lua

AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
util.AddNetworkString("TrackController")
local function ShowWindowOnCL(ply,ent)
net.Start("TrackController")
net.WriteEntity(ent)
net.Send(ply)
end
function ENT:Initialize()
self:SetModel("models/metrostroi/signals/clock_time.mdl")
end
function ENT:Think()
end
function ENT:SpawnFunction( ply, tr, ClassName )
if ( !tr.Hit ) then return end
local SpawnPos = tr.HitPos + tr.HitNormal * 16
local ent = ents.Create( ClassName )
ent:SetPos( SpawnPos )
ent:Spawn()
ent:Activate()
ShowWindowOnCL(ply,ent)
return ent
end