CapsAdmin

Untitled

Dec 11th, 2011
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. easylua.StartEntity("bomb")
  2.  
  3. if SERVER then
  4.     function ENT:Initialize()
  5.     self:SetModel("models/props_c17/FurnitureWashingmachine001a.mdl")
  6.     self:PhysicsInit(SOLID_VPHYSICS)
  7.    
  8.     self:StartMotionController()
  9.    
  10.     local phys = self:GetPhysicsObject()
  11.     phys:EnableMotion(false)
  12.     phys:EnableGravity(true)
  13.     end
  14.    
  15.     function ENT:PhysicsSimulate(phys)
  16.     phys:AddVelocity(self:GetUp() * 15)
  17.     --phys:AddAngleVelocity(self:LocalToWorldAngles(self:GetAngles()):Up() * 20)
  18.     end
  19.    
  20.     function ENT:PhysicsCollide(data)
  21.     if data.Speed > 200 then
  22.         self:Explode()
  23.     end
  24.     end
  25.    
  26.     function ENT:Explode()
  27.     Say("DeaD")
  28.     self:Remove()
  29.     end
  30. end
  31.  
  32. easylua.EndEntity(true, true)
  33.  
Advertisement
Add Comment
Please, Sign In to add comment