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)
Anybody help? The aimbot randomly aims at people through walls and is extremely shakey.
Originally Posted by poonystalker
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)
Anybody help? The aimbot randomly aims at people through walls and is extremely shakey.
ur getting trace for wrong person, get the trace for yourself
or !v:Alive()
or v:Health() < 1
I hope you realize The Alive check is %100 slow compared to health,
Originally Posted by 2cashs
I hope you realize The Alive check is %100 slow compared to health,
I was informed of this and corrected it. I also added a toggleable team check.
Originally Posted by poonystalker
I was informed of this and corrected it. I also added a toggleable team check.
Here, this should help you a bit with things.
if(v == me || v:IsDormant() || eHealth(v) < 1) then continue; end
if(DreamBot.Config["Aimbot"]["GhostCheck"] && v:GetColor().a != 255) then continue; end
if(!DreamBot.Config["Aimbot"]["targetteam"] && !DreamBot.Config["Aimbot"]["onlytargetteam"] && pTeam(me) == pTeam(v)) then continue; end
if (DreamBot.Config["Aimbot"]["onlytargetteam"] && pTeam(v) != pTeam(me)) then continue; end
if(!DreamBot.Config["Aimbot"]["targetfriends"] && pGetFriendStatus(v) == "friend") then continue; end