CSGO Aimbot Issues

Posts 1–8 of 8 · Page 1 of 1
CSGO Aimbot Issues
Having some issues with my aimbot.

So basically, it works when I press my aimkey, it changes my view angle, however, it doesn't follow things very well, nor does it always look at enemies. A lot of the time it'll change my angle to a random point on the map. Or other times, it'll lock on to an enemy through a wall when there's already an enemy right in front of me.
I feel like it's having some trouble getting the closest enemy to me.

Also, whenever I cout my view angle z, it says that it's like a bunch of random numbers when I run as a standard user, but when I run as admin, it gives me a 192.something. I know anything above 0 with x will cause an untrusted ban. Is that reading wrong? I haven't been VACced yet.

Also tried to add a function where if my viewangle z is not equal to 0 it'll close the program automatically, and that doesn't happen when I run the program which leads me to believe that my Z actually is 0, it's just not printing correctly.

I am clamping my angles correctly I believe.

Anyways, if anyone could help me with these issues, I'd appreciate it.
Quote Originally Posted by tweedash View Post
Having some issues with my aimbot.

So basically, it works when I press my aimkey, it changes my view angle, however, it doesn't follow things very well, nor does it always look at enemies. A lot of the time it'll change my angle to a random point on the map. Or other times, it'll lock on to an enemy through a wall when there's already an enemy right in front of me.
I feel like it's having some trouble getting the closest enemy to me.
Give us a video or some code, we can't helpyou else. Calc the Angle difference if you want to aim at the closest to your ch.
Quote Originally Posted by tweedash View Post
Also, whenever I cout my view angle z, it says that it's like a bunch of random numbers when I run as a standard user, but when I run as admin, it gives me a 192.something. I know anything above 0 with x will cause an untrusted ban. Is that reading wrong? I haven't been VACced yet.

Also tried to add a function where if my viewangle z is not equal to 0 it'll close the program automatically, and that doesn't happen when I run the program which leads me to believe that my Z actually is 0, it's just not printing correctly.

I am clamping my angles correctly I believe.

Anyways, if anyone could help me with these issues, I'd appreciate it.
Hmm maybe bc you read it as int ?again no clue due to lack of informations
Quote Originally Posted by Orinion77 View Post
Give us a video or some code, we can't helpyou else. Calc the Angle difference if you want to aim at the closest to your ch.

Hmm maybe bc you read it as int ?again no clue due to lack of informations
Don't entirely want to post all my code. Can I private message you?
I dont know what you are afraid of. Just post it.
Hm your ClampAngle functions is weird.. Try this:
Code:
float flAngleNormalize(float angle)
{
	while (angle < -180)    angle += 360;
	while (angle > 180)    angle -= 360;
	return angle;
}
Vector ClampAngle(Vector angles){
	angles.y = flAngleNormalize(angles.y);
	angles.x = flAngleNormalize(angles.x);
	if (angles.x > 89.0f)
		angles.x = 89.0f;
	if (angles.x < -89.0f)
		angles.x = -89.0f;

	angles.z = 0;
	return angles;

}
Quote Originally Posted by Orinion77 View Post
Hm your ClampAngle functions is weird.. Try this:
Code:
float flAngleNormalize(float angle)
{
	while (angle < -180)    angle += 360;
	while (angle > 180)    angle -= 360;
	return angle;
}
Vector ClampAngle(Vector angles){
	angles.y = flAngleNormalize(angles.y);
	angles.x = flAngleNormalize(angles.x);
	if (angles.x > 89.0f)
		angles.x = 89.0f;
	if (angles.x < -89.0f)
		angles.x = -89.0f;

	angles.z = 0;
	return angles;

}
The clamp angle function was a NaN check together with a normalize angle function and a clamp function. Like @Orinion77 suggested, split it up in 2 parts. Everytime you perform operations with any angle, normalize them. ( bla = a - b; normalize( bla ); ). Clamp them once, right before you set your viewangles.

The problem you're probably expiriencing is the while loop.

Code:
int Aimbot(void)
    {
        while (true)
        {
            Sleep(1);
            {
 
                    int entindex = ClosestEnemyToCrosshair(90.f);
                    DWORD LocalPlayer = Read <DWORD>(clientDLL + dwlocalplayer);
                    Vector3 origin = Read<Vector3>(LocalPlayer + m_vecOrigin);
                    Vector3 vecview = Read<Vector3>(LocalPlayer + m_vecViewOffset);
                    position.x = origin.x + vecview.x;
                    position.y = origin.y + vecview.y;
                    position.z = origin.z + vecview.z;
                    while (GetAsyncKeyState(VK_XBUTTON1))
                    {
 
                        Vector3 punch = Read<Vector3>(dwlocalplayer + m_vecPunch);
                        Vector3 angles;
 
                        DWORD entitybase = Read<DWORD>(clientDLL + dwentitylist + (entindex * 0x10));
                        Vector3 pos = BonePos(entitybase, bonematrixoffset, 11);
 
                        CalcAngle(position, pos, angles);
                        angles.x = angles.x - punch.x * 2.f;
                        angles.y = angles.y - punch.y * 2.f;
                        ClampAngles(angles);
                        if (angles.x == 0 && angles.y == 0)
                            continue;
                       
                        DWORD clientstate = Read<DWORD>(engineDLL + m_dwClientState);
                        Write<Vector3>(clientstate + m_dwViewAngles, angles);
 
                    }
                Sleep(1);
            }
        }
        return 0;
    }
Once you're getting to the bold part, you're looping for as long as you keep pressing the button. By the way, GetAsyncKeyState also returns a positive number when the key was pressed since the last call, you should bitshift the most significant bit to make sure you're only executing statements whenever you're pressing the key.

If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState.
The problem you're having is that you're not updating your position, which results in wrongly calculated angles. The angle which gets calculated is between your position before you got into the while loop and the current position of the bone of the entity.

If i were you, i'd exchange the while loop with an if statement. This would also fix the problem that you're aiming onto an entity far away when another entity got closer towards you, since you also not update the closest entity unless you let go of the key.

If you keep your while( GetAsyncKeyState ) loop, move the statements where you read out the information for your position etc into the while loop.
/Solved & closed.
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us