From b738117470b21fbc75f0c126ba7d70052176a2aa Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 5 May 2016 20:01:07 -0400 Subject: Added camp fire --- entities/entities/gms_campfire.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 entities/entities/gms_campfire.lua (limited to 'entities') diff --git a/entities/entities/gms_campfire.lua b/entities/entities/gms_campfire.lua new file mode 100644 index 0000000..a3c27b4 --- /dev/null +++ b/entities/entities/gms_campfire.lua @@ -0,0 +1,32 @@ + + +AddCSLuaFile() + +ENT.Base = "gms_base_entity" +ENT.PrintName = "Campfire" + +ENT.Model = "models/XQM/Rails/gumball_1.mdl" +ENT.Burnproxy = nil +if ( CLIENT ) then return end + +function ENT:OnInitialize() + self:SetModel( self.Model ) + self:PhysicsInit( SOLID_VPHYSICS ) + self:SetMoveType( MOVETYPE_NONE ) + self:SetSolid( SOLID_VPHYSICS ) + self.Burnproxy = ents.Create("prop_physics") + self.Burnproxy:SetModel("models/props_phx/construct/wood/wood_panel1x1.mdl") + self.Burnproxy:Ignite(9999999) + self.Burnproxy:SetPos(self:GetPos()) + self.Burnproxy:SetAngles(self:GetAngles()) + self.Burnproxy:SetColor(Color(0,0,0,0)) + --Removes everything after a little while + timer.Simple( 180, function() + self.Burnproxy:Remove() + self:Remove() + end ) +end + +function ENT:OnUse( ply ) + ply:OpenCombiMenu( "Cooking" ) +end -- cgit v1.2.3-70-g09d2