If you want to make one like A-Hack, did it occur to you that looking at the code of A-Hack might help?
I am trying to make an aimbot but I am failing. I wanna make an aimbot at the quality of A-Hack (If you didn't know it's fucking crazy good)
Can someone tell me some tips on how to make one?
If you want to make one like A-Hack, did it occur to you that looking at the code of A-Hack might help?
Yes I did, did I say I didn't?
I'd have thought it'd be enough of a base for you to make a half-decent aimbot.
How most Gmod aimbots work:
1. Get all players
2. See is players are visible
3. Get head (or another bone) position of player
4. Set your eye angles to that player's head
Some use OBBCenter, heads are easier to start with imo though
lol a-hack's aimbot "crazy good"
hahahahah
D3M0L1T10N (08-18-2013)
This explains it quite well.
How to make a basic aimbot. - GMod Wiki
Well, it works for me it's not the best but that comment was mostly just a first impression on people. I've seen your work aswell Tyler.
---------- Post added at 06:44 PM ---------- Previous post was at 06:43 PM ----------
I got something going but I cant figure out how to set the angle to the head keep the aim on the head.
LordOfGears2 (08-18-2013)
Here Man I Don't Really Leak Alot Of MY Cheats But I Will Give You A Basic AImbot Code I Coded YesterdaY In My SPare Time
function aimbot() -- Starting the function
local ply = LocalPlayer() -- Getting ourselves
local trace = util.GetPlayerTrace( ply ) -- Player Trace part. 1
local traceRes = util.TraceLine( trace ) -- Player Trace part. 2
if traceRes.HitNonWorld then -- If the aimbot aims at something that isn't the map..
local target = traceRes.Entity -- It's obviously an entity.
if target:IsPlayer() then -- But it must be a player.
local targethead = target:LookupBone("ValveBiped.Bip01_Head1") -- In this aimbot we only aim for the head.
local targetheadpos,targetheadang = target:GetBonePosition(targethead) -- Get the position/angle of the head.
ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle()) -- And finally, we snap our aim to the head of the target.
end
end
end
hook.Add("Think","aimbot",aimbot) -- The hook will spam "aimbot" until it finds a target..