diff options
Diffstat (limited to 'entities')
| -rw-r--r-- | entities/entities/gms_campfire.lua | 32 |
1 files changed, 32 insertions, 0 deletions
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 |
