sort player table by distance relative to localplayer and/or use fov system
I made an aimbot, and it works. But it seems to favor one person. If that person is dead, it will go to the next. Is there a way to fix it?
ThanksCode:hook.Add( "Think", "Aimbot", function() for k,v in pairs ( player.GetAll() ) do if v:Alive() and v:IsValid() then local head = v:LookupBone("ValveBiped.Bip01_Head1") local headpos,headang = v:GetBonePosition(head) if input.IsKeyDown( KEY_LALT ) then ply:SetEyeAngles((headpos - ply:GetShootPos()):Angle()) end end end end)![]()
sort player table by distance relative to localplayer and/or use fov system
Thanks, didnt think of that.