Anybody help? The aimbot randomly aims at people through walls and is extremely shakey.Code:hook.Add("CreateMove", "Aimbot", function(CUserCmd) for k,v in pairs ( player.GetAll() ) do local aimat = ( v:GetPos() ) if v == LocalPlayer() then aimat = "" else aimat = v:GetPos() end local ply = LocalPlayer() local trace = util.GetPlayerTrace( v ) local traceRes = util.TraceLine( trace ) if traceRes.HitNonWorld then if v:IsPlayer() then local targethead = v:LookupBone("ValveBiped.Bip01_Head1") local targetheadpos = v:GetBonePosition(targethead) CUserCmd:SetViewAngles((targetheadpos - ply:GetShootPos()):Angle()) end end end end)
Last edited by Hunter; 01-17-2016 at 12:41 PM.
I hope you realize The Alive check is %100 slow compared to health,or !v:Alive()
or v:Health() < 1
Here, this should help you a bit with things.
if(v == me || v:IsDormant() || eHealth(v) < 1) then continue; end
if(DreamBo*****nfig["Aimbot"]["GhostCheck"] && v:GetColor().a != 255) then continue; end
if(!DreamBo*****nfig["Aimbot"]["targetteam"] && !DreamBo*****nfig["Aimbot"]["onlytargetteam"] && pTeam(me) == pTeam(v)) then continue; end
if (DreamBo*****nfig["Aimbot"]["onlytargetteam"] && pTeam(v) != pTeam(me)) then continue; end
if(!DreamBo*****nfig["Aimbot"]["targetfriends"] && pGetFriendStatus(v) == "friend") then continue; end