Solved CSGO Aimbot Smoothing

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
Made an aimbot this morning (External) that works great if you feel like raging. But i'm trying to make it look more legit by adding a smoothing feature.

Here's the jist of it (there is a lot more to it like distance checks and other things)
C++:
Aimbot.CalcAngle(LocalPlayer.vecHeadBone, Engine.enemy[Aimbot.Target].vecHeadBone, ref Engine.enemy[Aimbot.Target].AimbotAngle);
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles), Engine.enemy[Aimbot.Target].AimbotAngle.x);
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles + 4), Engine.enemy[Aimbot.Target].AimbotAngle.y);
I have tried 20 different ways and i'm getting quite frustrated. Basically what i'm trying to do is this:
I have my view angle x and y. And a destination x and y.

let's say
myX = 0;
myY = 0;
destinationX = 100;
destinationY = -100;

Instead of simply writing my players angle to be 100, -100 i would like to do this smoothly.
So maybe i would write the angle 50 different times a little bit differently each time. instead of moving all 100 pixels at once.
Idc what language your example code is in. Any help would be appreciated.
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
You seem to be right. This does not do anything useful for me as it is the complete opposite effect of smoothing. If my crosshair is to the right of the enemy is shoots really far left then right then left again (over and over) until it finally reaches their head. Can't believe how much trouble this thing is giving me. It really seems simple..
You might just be over thinking it.

I'd imagine your code would look something like this.

C++:
Aimbot.CalcAngle(Engine.LocalPlayer.vecHeadBone, Engine.enemy[i].vecHeadBone, ref Engine.enemy[i].AimbotAngle);

Engine.Vec3 Diffs = new Engine.Vec3();
Diffs = Engine.enemy[i].AimbotAngle - Engine.LocalPlayer.vecViewAngle;


float newX = Engine.mem.ReadFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles));
float newY = Engine.mem.ReadFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles+4));

newX += Diffs.x / smoothing;
newY += Diffs.y / smoothing;

Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles), newX);
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles+4), newY);
If that isn't working, have you tried calculating your differences with absolute values? negative values in that calculation may throw some stuff off?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
From Solaire's source code, Inside a shoot loop:
C++:
float smoothing = 4.0f;
// Get the view angles we need to aim at
Vec3D aimbotAngle = calcAngles(Vec3D(pLocal->o.x, pLocal->o.y, pLocal->o.z), Vec3D(ent->o.x, ent->o.y, ent->o.z ));
// Get the difference between the angles we need, and our current ones for smoothing
Vec3D diffs = aimbotAngle - Vec3D(pLocal->yaw, pLocal->pitch, pLocal->roll);

pLocal->yaw += diffs.x / smoothing;
pLocal->pitch += diffs.y / smoothing;
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
Rake;45957 said:
From Solaire's source code, Inside a shoot loop:
C++:
float smoothing = 4.0f;
// Get the view angles we need to aim at
Vec3D aimbotAngle = calcAngles(Vec3D(pLocal->o.x, pLocal->o.y, pLocal->o.z), Vec3D(ent->o.x, ent->o.y, ent->o.z ));
// Get the difference between the angles we need, and our current ones for smoothing
Vec3D diffs = aimbotAngle - Vec3D(pLocal->yaw, pLocal->pitch, pLocal->roll);

pLocal->yaw += diffs.x / smoothing;
pLocal->pitch += diffs.y / smoothing;
Been trying stuff like this all day.
What am i doing wrong?
C++:
Aimbot.CalcAngle(Engine.LocalPlayer.vecHeadBone, Engine.enemy[i].vecHeadBone, ref Engine.enemy[i].AimbotAngle);

Engine.Vec3 Diffs = new Engine.Vec3();
Diffs = Engine.enemy[i].AimbotAngle - Engine.LocalPlayer.vecViewAngle;

Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles), Diffs.x / smoothing);
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles+4), Diffs.y / smoothing);
Using the code like this (like solaires) results in 0, 0 being written to my angle.
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
C++:
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles), Diffs.x / smoothing);
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles+4), Diffs.y / smoothing);
I think the problem here is your writing the difference, between the AimbotAngles and current PlayerAngles, divided by smoothing.
Instead, you need to add (Diffs/smoothing) to whatever is currently in LocalPlayer.ViewAngles and then write the result of THAT to the memory addresses.
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
I think the problem here is your writing the difference, between the AimbotAngles and current PlayerAngles, divided by smoothing.
Instead, you need to add (Diffs/smoothing) to whatever is currently in LocalPlayer.ViewAngles and then write the result of THAT to the memory addresses.
You seem to be right. This does not do anything useful for me as it is the complete opposite effect of smoothing. If my crosshair is to the right of the enemy is shoots really far left then right then left again (over and over) until it finally reaches their head. Can't believe how much trouble this thing is giving me. It really seems simple..
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
You might just be over thinking it.

I'd imagine your code would look something like this.

C++:
Aimbot.CalcAngle(Engine.LocalPlayer.vecHeadBone, Engine.enemy[i].vecHeadBone, ref Engine.enemy[i].AimbotAngle);

Engine.Vec3 Diffs = new Engine.Vec3();
Diffs = Engine.enemy[i].AimbotAngle - Engine.LocalPlayer.vecViewAngle;


float newX = Engine.mem.ReadFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles));
float newY = Engine.mem.ReadFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles+4));

newX += Diffs.x / smoothing;
newY += Diffs.y / smoothing;

Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles), newX);
Engine.mem.WriteFloat((IntPtr)(Engine.LocalPlayer.ClientStateBase + Offsets.oViewAngles+4), newY);
If that isn't working, have you tried calculating your differences with absolute values? negative values in that calculation may throw some stuff off?
Just got it to work! thanks so much for the help!
 

Oneshot

Meme Tier VIP
Apr 4, 2015
232
190
13
to make the smoothing linear you can calculate angle from your current viewangle to the enemy and then do

newangle * ( a number like 20 ); // and then use this as smooth value

and this will make the movement go from slow to fast

newangle ^2 / 20; // the 20 is just so it wont be to slow. you can experiment some with it its fun. took me some time to figure this shit out. this is premium info ;)
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
to make the smoothing linear you can calculate angle from your current viewangle to the enemy and then do

newangle * ( a number like 20 ); // and then use this as smooth value

and this will make the movement go from slow to fast

newangle ^2 / 20; // the 20 is just so it wont be to slow. you can experiment some with it its fun. took me some time to figure this shit out. this is premium info ;)
so i would do
newX *= 20;
newY *= 20;

and then what?
idk what the ^2 is supposed to be i'm sorry lol..
is that supposed to represent the power of 2?
really appreciate this man.
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
so i would do
newX *= 20;
newY *= 20;

and then what?
idk what the ^2 is supposed to be i'm sorry lol..
is that supposed to represent the power of 2?
really appreciate this man.
I'm pretty sure he royally fucked up his explanation lol.

NewAngle *= 20; I think we all know what this is going to do...

Now... The second equation can be read one of two ways.
{ newangle ^2 / 20; } is == to { (newagle * newangle) / 20; }
We can insert parenthesis to make it a bit clearer but usually the caret (^) means an exponent and the number following will be the degree or power. (so x^2 is x*x and x^3 is x*x*x, etc...)

OR

newangle ^ (2/20) (2/20 can also be expressed as 1/10) what this means is a fractional exponent. So... if I'm reading this correctly, you'd essentially apply a 10th-root operation (instead of square root or cube root, 10th root) and then raise it to the power of 1 (leave it alone.) Or you can try getting the 20th root, and then squaring.

Here's an example.

= 27^(2/3) = (cube root of 27)(Square)
= 3^2 = (cube root of 27)(Square)
= 9 = (cube root of 27)(Squared)

Either way, I think he was smoking some :kilo::kilo: when he wrote that.
 

Oneshot

Meme Tier VIP
Apr 4, 2015
232
190
13
this is the code that makes my aimbot go slow to fast
C++:
      Rmine1 = RnewangleX;
		Rmine2 = RnewangleY;
		posX = Rmine1 / RSmoothaimX;
		posY = Rmine2 / RSmoothaimY;
		posintX = posX;
		posintY = posY;
		anglexsmoothX = RnewangleX;

		if (anglexsmoothX < 0)
		{
			anglexsmoothX = -anglexsmoothX;
		}
		RSmoothaimX = (anglexsmoothX * anglexsmoothX);
		if (RSmoothaimX < 20)
		{
			RSmoothaimX = 20;
		}
		anglexsmoothY = RnewangleY;
		if (anglexsmoothY < 0)
		{
			anglexsmoothY = -anglexsmoothY;
		}
		RSmoothaimY = (anglexsmoothY * anglexsmoothY) + RSmoothaimX;
		if (RSmoothaimY < 20)
		{
			RSmoothaimY = 20;
		}
I have a hard time explaining this because i am not that good at math . here's a video.

https://www.youtube.com/watch?v=e6A5BQpTMJk&feature=youtu.be
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
nibba a mathematician would have trouble deciphering that snippet lol.
There are a bunch of variables that aren't used and at the end we still don't know how you use the the values.
I feel like you might be missing another couple lines of code for it to all make sense. Looks fucking dope in the video though :)
 

Oneshot

Meme Tier VIP
Apr 4, 2015
232
190
13
okej so what i am doing here is i am using the distance from my crosshair to the enemy times itself as a value for the smooth. so viewanglesX + (posX / "new value" )
so when the angle is bigger the bigger the smooth value will be and the smaller the smaller the smooth value will be.
so bigger means slower and vice versa. i know my code looks like shit and are very unfriendly hahha. i hope that you understand i cant show you in code because it looks like shit. this is my first aimbot and its hard to read codewise. i hope you got the ide now so you can code this yourself.
 
Last edited:

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
So I threw a little linear-smooth aim routine or whatever for AC...
I got high and remembered this shit... and now its late :smile:

readable code below! lol :trollface:

C++:
if (target.playerEnt != nullptr) 
{
	vec diff = { target.vAimAngles.x - localPlayer.playerEnt->vViewAngs.x,
					target.vAimAngles.y - localPlayer.playerEnt->vViewAngs.y,
					target.vAimAngles.z - localPlayer.playerEnt->vViewAngs.z };
			
	if (abs(diff.x) > 180)
	{
		diff.x *= -1;
	}

	float smoothing = diff.x * diff.x;

	if (smoothing > 700)	
		smoothing = 700;	
	if (smoothing < 25)		
		smoothing = 25;		

	float newX = (diff.x / (smoothing*smoothing));
	localPlayer.playerEnt->vViewAngs.x += newX;
	localPlayer.playerEnt->vViewAngs.y += (diff.y / smoothing);
	std::chrono::milliseconds(1);
}
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods