i have not idea how to make it. i watch the fleep hacks tutorials, but his aimbot so bad. I am hope for your help, thanks
if you dont know how to make an aimbot on your own (neither do I), look at source codes like the one from de_stroyer (click here)
To be honest I would also appreciate if someone posted an external aimbot source example. Thanks in advance
1. Get an Entity to aim at, it can be in many different ways, but you need to have one Entity to aim at. You could take the closest one, you could take the closest one to your crosshair, whatever, but you need to somehow determine which Entity you should aim at.
2. Get the position you want to aim at. You could aim at their feet by taking their vecOrigin, take the vecOrigin + EyePosition, the exact bone position of their head ( there are many c+p ready GetBonePos functions in here ), chest, whatever you want. Got the position? Let's go.
3. CalcAngle. Let's pretend CalcAngle is magical and does exactly what you need. It calculates the angle between your camera and the enemies position you wanted to aim at ( vecOrigin, BonePosition whatever ). It returns you a ready to set ViewAngle which aims at the position you wanted to aim at.
4. Set the angle. It's a ready angle, set it and you are aiming at the enemies position ( vecOrigin, BonePos, whatever ).
To add recoil control, you need to understand how it works.
You are not going to change the recoil, you are changing your view angles so that you compensate the recoil so that the shot will land where you want it to land.
The red lines are your view angles.
You first aim at an enemy without any recoil.
Start shooting and your view angles will move up because of the recoil.
Subtract the recoil twice from your AimAngles ( the angle from CalcAngle which aims at the enemies position ( vecOrigin, BonePos, whatever ) ) and your shots will land where they should land.
4773n0x (04-26-2016),artzyhswag (04-22-2016),Hunter (04-22-2016),idkaname23 (04-22-2016)
/Solved & closed.