CapsAdmin

Untitled

Apr 25th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hook.Add("CreateMove", "follow", function(cmd)
  2.     local ply = LocalPlayer()
  3.     local target = player.GetByUniqueID(--[[KpK.Y0uM]] "3231181953") or NULL
  4.        
  5.     if target:IsValid() then           
  6.         local apos = ply:EyePos()
  7.         local bpos = target:EyePos()
  8.            
  9.         local offset = bpos - apos
  10.         local length = offset:Length()
  11.            
  12.         local ang = offset:Angle()
  13.         ang.p = math.NormalizeAngle(ang.p)
  14.            
  15.         if not target:Alive() and ply:Alive() then
  16.             RunConsoleCommand("aowl", "kill")  
  17.         elseif target:Alive() and not ply:Alive() then
  18.             RunConsoleCommand("aowl", "revive")
  19.         end
  20.            
  21.         if util.TraceLine({start = apos, endpos = bpos, filter = {ply, target}}).Fraction ~= 1 then
  22.             RunConsoleCommand("aowl", "goto", target:UniqueID())   
  23.         end
  24.        
  25.         if length > 100 then
  26.             cmd:SetForwardMove(1000)           
  27.         end
  28.            
  29.         cmd:SetViewAngles(ang)
  30.     end
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment