Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- ENT.Type = "anim"
- ENT.Base = "base_entity"
- ENT.PrintName = "Caixa"
- ENT.Author = "Dom"
- ENT.Spawnable = true
- ENT.AdminSpawnable = true
- ENT.Category = "FakeGasFactory"
- if SERVER then
- function ENT:Initialize()
- self:SetModel("models/props/cs_office/cardboard_box03.mdl")
- self:PhysicsInit(SOLID_VPHYSICS)
- self:SetMoveType(MOVETYPE_VPHYSICS)
- self:SetSolid(SOLID_VPHYSICS)
- self:SetCollisionGroup(COLLISION_GROUP_NONE)
- local phys = self:GetPhysicsObject()
- if phys and phys:IsValid() then
- phys:Wake()
- end
- self.Cigarret = 0
- self.usebla = false
- end
- function ENT:StartTouch(ent)
- if ent:GetClass() == "cigarro" and self.Cigarret <= 9 then
- self.Cigarret = self.Cigarret + 1
- print(self.Cigarret)
- ent:Remove()
- end
- if self.Cigarret == 10 then
- self:SetNWInt("Cigarrin", self.Cigarret)
- self.usebla = true
- end
- end
- end
- if CLIENT then
- function ENT:Initialize()
- end
- function ENT:Draw()
- self:DrawModel()
- end
- function ENT:Think()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement