i was and am extremely tired when was trying to fix the damn code for no-spread with AHack..... so this is what came out
Code:
hook.Add("CreateMove", AHack.RandomName(math.random(10, 15)), function(cmd)
if AHack.Active:GetBool() then
if AHack.Aimbot.Vars["Active"]:GetBool() and not (AHack.Aimbot.Vars["PanicMode"]:GetBool() and #AHack.Spectators > 0) then
if not AHack.Aimbot.Vars["AimOnKey"]:GetBool() or (AHack.Aimbot.Vars["AimOnKey"]:GetBool() and AHack.KeyPressed(AHack.Aimbot.Vars["AimOnKey_Key"]:GetString())) then
if AHack.ValidTarget() then
local BoneOrder = {}
if AHack.Aimbot.CurTarget.BoneToAimAt and AHack.Aimbot.Vars["RandomBones"]:GetBool() then
table.insert(BoneOrder, AHack.Aimbot.CurTarget.BoneToAimAt)
table.Add(BoneOrder, AHack.GetRandomBones())
table.Add(BoneOrder, AHack.Bones)
else
if AHack.Aimbot.Vars["RandomBones"]:GetBool() then
table.Add(BoneOrder, AHack.GetRandomBones())
table.Add(BoneOrder, AHack.Bones)
else
table.Add(BoneOrder, AHack.Bones)
end
end
for k = 1, #BoneOrder do
local v = BoneOrder[k]
local bone = AHack.Aimbot.CurTarget:LookupBone(v)
if bone != nil then
local pos, ang = AHack.Aimbot.CurTarget:GetBonePosition(bone)
if v == "ValveBiped.Bip01_Head1" then
pos = pos + Vector(0, 0, 3) //Aiming a little higher for the head
end
local total, needed = 300, {300, 300}
if AHack.Aimbot.Vars["Prediction"]:GetBool() then
local tarSpeed = AHack.Aimbot.CurTarget:GetVelocity() * 0.009
local plySpeed = AHack.Ply:GetVelocity() * 0.009
total, needed = AHack.AngleTo(pos - plySpeed + tarSpeed)
else
total, needed = AHack.AngleTo(pos)
end
if AHack.CanSee(Pos, ent) and total < AHack.Aimbot.Vars["MaxAngle"]:GetInt() then
local myAngles = AHack.Ply:GetAngles()
local NewAngles = Angle(myAngles.p + needed.p, myAngles.y + needed.y, 0)
if AHack.Aimbot.Vars["AntiSnap"]:GetBool() then
local speed = AHack.Aimbot.Vars["AntiSnapSpeed"]:GetInt()
NewAngles = (Angle(math.Approach(myAngles.p, NewAngles.p, speed), math.Approach(myAngles.y, NewAngles.y, speed), 0))
end
if AHack.Aimbot.Vars["NoSpread"]:GetBool() and AHack.NoSpread then
local weapon = AHack.Ply:GetActiveWeapon()
if IsValid(weapon) and weapon.Primary and weapon.Primary.Cone then
NewAngles = DS_manipulateShot(DS_md5PseudoRandom(DS_getUCMDCommandNumber(cmd)), NewAngles:Forward(), Vector(-weapon.Primary.Cone, -weapon.Primary.Cone, 0)):Angle()
elseif IsValid(weapon) and weapon.Cone then
NewAngles = DS_manipulateShot(DS_md5PseudoRandom(DS_getUCMDCommandNumber(cmd)), NewAngles:Forward(), Vector(-weapon.Cone, -weapon.Cone, 0)):Angle()
end
end
AHack.Ply:SetViewAngles(NewAngles)
AHack.Aimbot.CurTarget.BoneToAimAt = BoneOrder[k]
break
end
end
end
else
AHack.Aimbot.CurTarget = AHack.GetTarget()
end
else
AHack.Aimbot.CurTarget = nil
end
end
if any of you want to help me and fix this thing up then please do, send me the patch or whatever in a PM because im going to bed now G'Night