diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-05 20:01:07 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-05 20:01:07 -0400 |
| commit | b738117470b21fbc75f0c126ba7d70052176a2aa (patch) | |
| tree | 57afcd5d9a895aa61e3e2ffcf80a2fc3bfa48725 /entities | |
| parent | 2c92bbbbf0770e90a1f80494dcd959d214675ac9 (diff) | |
| download | gmstranded-b738117470b21fbc75f0c126ba7d70052176a2aa.tar.gz gmstranded-b738117470b21fbc75f0c126ba7d70052176a2aa.tar.bz2 gmstranded-b738117470b21fbc75f0c126ba7d70052176a2aa.zip | |
Added camp fire
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 |
