CapsAdmin

Untitled

Oct 25th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local function animate(ply)
  2.     local id = "televator_gman_suitcase_" .. ply:UniqueID()
  3.     local seq = ply:LookupSequence("menu_gman")
  4.     local cycle = 0
  5.    
  6.     hook.Add("CalcMainActivity", id, function(_ply)
  7.         if _ply ~= ply or not ply:IsValid() then return end
  8.         if cycle > 1 then  
  9.             hook.Remove("CalcMainActivity", id)
  10.         end
  11.        
  12.         ply:SetCycle(cycle)
  13.        
  14.         cycle = cycle + FrameTime() * 0.25
  15.        
  16.         return seq, seq
  17.     end)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment