Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local me = LocalPlayer();
- hook.Add("CreateMove", "", function(ucmd)
- if(ucmd:CommandNumber() == 0) then return; end
- for k,v in next, player.GetAll() do
- if(!v || !v:IsValid() || v:Health() < 1 || v:IsDormant() || v == me) then continue; end
- local bone = v:GetHitBoxBone(0, 0);
- if(!bone) then continue; end
- local min, max = v:GetHitBoxBounds(0, 0);
- local pos = ( v:GetBonePosition( bone ) + ( (min + max) / 2 ) ) - me:EyePos();
- local ang = pos:Angle();
- ang:Normalize();
- ucmd:SetViewAngles(ang);
- break;
- end
- end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement