Advertisement
spinsquad

kool hitbox aim

May 29th, 2015
686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. local me = LocalPlayer();
  2.  
  3. hook.Add("CreateMove", "", function(ucmd)
  4. if(ucmd:CommandNumber() == 0) then return; end
  5. for k,v in next, player.GetAll() do
  6. if(!v || !v:IsValid() || v:Health() < 1 || v:IsDormant() || v == me) then continue; end
  7. local bone = v:GetHitBoxBone(0, 0);
  8. if(!bone) then continue; end
  9. local min, max = v:GetHitBoxBounds(0, 0);
  10. local pos = ( v:GetBonePosition( bone ) + ( (min + max) / 2 ) ) - me:EyePos();
  11. local ang = pos:Angle();
  12. ang:Normalize();
  13. ucmd:SetViewAngles(ang);
  14. break;
  15. end
  16. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement