CapsAdmin

Untitled

May 29th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. function SENT:Initialize()
  2.     self:SetModel("Objects/library/storage/barrels/empty_metal_barrel_a.cgf")
  3.     self:Physicialize(PE_RIGID)
  4. end
  5.  
  6. local angle = Ang3(90,0,0)
  7. local i = 0
  8. function SENT:PrePhysicsUpdate(phys, frametime)
  9.     i = i + frametime
  10.     local ply = LocalPlayer()
  11.     local endpos = ply:GetEyePos() + ply:GetEyeDir() * 3
  12.    
  13.     phys:SmoothMove(endpos, frametime * 1500)
  14.     self:SetAngles(angle)
  15.     self:SetOpacity(math.abs(math.sin(i)))
  16. end
Advertisement
Add Comment
Please, Sign In to add comment