Video Tutorial CSGO Aimbot Tutorial + CalcAngle Explained in Detail

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

BDKPlayer

No hack no life
Dank Tier VIP
Dank Tier Donator
Oct 31, 2013
383
13,688
36
@BDKPlayer will teach you how to make a basic aimbot in CSGO. You should already know the basics, this is not a beginner tutorial. This is for people wanting to learn how to make a basic aimbot and wanting to understand the math behind it. It's basic trigonometry, but even basic trigonometry can be confusing.

In order to to write a CalcAngle function or a AimAt function you need to understand the basics of the pythagorean theorem and euclidean geometry. Basics things you want to understand in regards to angles/triangles are sine, cosine & tangent. And their inverses, arcsine, arccosine, and arctangent.



You will learn how we apply these ideas to develope an aimbot.

Before you do this tutorial you will want to be educated on CSGO and the basics of game hacking:
-Guide - How to Make CSGO Hacks - START HERE GUIDE
-Guide - START HERE Beginners Guide to Learning Game Hacking




https://guidedhacking.com/threads/aimbot-math-explained.13544/
https://guidedhacking.com/threads/ultimate-calcangle-thread-how-to-calculate-angle-functions.8165/
@Liduen posted a good picture illustrating some of this: https://guidedhacking.com/gh/sshots/ey5oob9p.jpg

Huge thank you @BDKPlayer for making this video!

Download source code in attachments, you just need to update the offsets
 

Attachments

Last edited by a moderator:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,176
78,998
2,399
This video is going to break a record, it had 350 views during the premiere and it's gonna hit 2,500 views within 24 hours. Thanks again @BDKPlayer for this awesome video (hope you make some more :p)
 
Jan 24, 2019
4
12
0
I have a question about the vector3 class.
C++:
Vector3& operator+(Vector3 arg)
    {
        x += arg.x;
        y += arg.y;
        z += arg.z;
        return *this;
    }
what is this function used for?.
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,176
78,998
2,399
I have a question about the vector3 class.
C++:
Vector3& operator+(Vector3 arg)
    {
        x += arg.x;
        y += arg.y;
        z += arg.z;
        return *this;
    }
what is this function used for?.
he's overloading the addition operator, so when you use this you are adding a vector to the current vector, so:

vecA = vecA + vecB;
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,746
40,528
316
Yeah, but why would we need to add vectors together?
Not in this tutorial but sometimes you need to do that. A class like that should support all arithmetic operators.
 

Meanjellybean

Trump Tier Donator
Dank Tier Donator
Sep 21, 2019
18
598
0
WOW love this detail. im very impressed by this whole site!
this is for the love of the game :cool:
 
Jul 13, 2019
3
12
0
Thank you for this tutorial.
Works with bots but when i go to Deathmatch with players sometimes it aim's to nothing and game get's crashed.
 
Jul 13, 2019
3
12
0
Now i got this problem.

When i'm in front of the target it aims perfectly.



When i am behind the enemy it's moving the chrosshair near the enemy head.





Thank you.
 

BDKPlayer

No hack no life
Dank Tier VIP
Dank Tier Donator
Oct 31, 2013
383
13,688
36
Now i got this problem.
When i'm in front of the target it aims perfectly.
When i am behind the enemy it's moving the chrosshair near the enemy head.
How do you get the head position? Do you use bones to get the head bone? Or just add origin + viewOffset? If thats not the issue we will have to see some code I guess.
 
  • Like
Reactions: Laszl0w
Jul 13, 2019
3
12
0
I didnt use bones

Code:
DWORD CurrentBaseAddress = proM.Read<DWORD>(Client + dwLocalPlayer);
    
    player.x = proM.Read<float>(CurrentBaseAddress + m_vecOrigin);
    player.y = proM.Read<float>(CurrentBaseAddress + m_vecOrigin + 4);
    player.z = proM.Read<float>(CurrentBaseAddress + m_vecOrigin + 8);
Code:
    DWORD CurrentBaseAddress = proM.Read<DWORD>(Client + dwEntityList + (i * 0x10));
        entity[i].x = proM.Read<float>(CurrentBaseAddress + m_vecOrigin);
        entity[i].y = proM.Read<float>(CurrentBaseAddress + m_vecOrigin + 4);
        entity[i].z = proM.Read<float>(CurrentBaseAddress + m_vecOrigin + 8);
Code:
void changeAngle(float xAngle, float yAngle)
{
    proM.Write<float>(val.EngineAdr + dwClientState_ViewAngles + 4, xAngle);
    proM.Write<float>(val.EngineAdr + dwClientState_ViewAngles, yAngle);
}
Code:
void AimtoNearest(int i)
{

    Vector3 deltaVec1 = Vector3( entity[i].x - player.x, entity[i].y - player.y, entity[i].z - player.z );
    float deltaVecLength1 = sqrt(deltaVec1.x * deltaVec1.x + deltaVec1.y * deltaVec1.y + deltaVec1.z * deltaVec1.z);
    double PI = 3.14159265358;
    float pitch = -asin(deltaVec1.z / deltaVecLength1) * (180 / PI);
    float yaw = atan2(deltaVec1.y, deltaVec1.x) * (180 / PI);

    if (pitch >= -89 && pitch <= 89 && yaw >= -180 && yaw <= 180)
    {
        changeAngle((float)yaw, (float)pitch);
    }

}
 

BDKPlayer

No hack no life
Dank Tier VIP
Dank Tier Donator
Oct 31, 2013
383
13,688
36
Since you are using origin instead of actual head positioning you are calculating the angle alpha which is equal to angle beta since you and the enemy have the same body height.
angles.png

In some cases the head position will not be exactly above the enemies origin. One such example is your AWP screenshot. The guys is leaning forward. Your aimbot will always be off if the enemy origin and head are not exactly on a vertical line from your point of view:
QuUrUkh.png
 
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