CapsAdmin

Untitled

May 20th, 2012
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local i = 0
  2. local last
  3. hook.Add("Think", 1, function()
  4.     local t = math.Round(i)
  5.  
  6.     if t == 1 or t == 4 or t == 9 or t == 12 then  
  7.     if not last then
  8.         local pitch = 10
  9.         for i=1, 2 do
  10.         WorldSound("doors/door_metal_medium_close1.wav", Entity(871):GetPos(), 100, pitch)
  11.         end
  12.         last = true
  13.     end
  14.     else
  15.     last = false
  16.     end
  17.    
  18.     i = (i + FrameTime() * (Entity(871):GetVelocity():Length() / 50))%30
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment