Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile( "cl_init.lua" )
- AddCSLuaFile( "shared.lua" )
- include('shared.lua')
- function ENT:Initialize()
- self:SetModel("models/props_lab/monitor01a.mdl")
- self:PhysicsInit(SOLID_VPHYSICS)
- self:SetMoveType(MOVETYPE_VPHYSICS)
- self:SetSolid(SOLID_VPHYSICS)
- self:SetUseType( SIMPLE_USE )
- self:SetPos(self:GetPos()+Vector(0,0,5))
- local phys = self:GetPhysicsObject()
- if IsValid(phys) then
- phys:Wake()
- end
- plug = ents.Create( "ent_plug" )
- if ( !IsValid( plug ) ) then return end
- plug:SetPos( self:GetPos() + Vector( 50, 25, 0 ) )
- plug:SetAngles(self:GetAngles())
- plug:Spawn()
- plug.defaultDevice = self
- self.rope = constraint.Rope( self, plug, 0, 0, Vector(-10,0,0), Vector(0,0,0), 200, 0, 9999999, 1, Material("cable/cable2"), false )
- end
- function ENT:OnRemove()
- plug:Remove()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement