Hello everyone and welcome to my tutorial, Here I will explain a little bit on how the CBaseEntity , CLocalPlayer struct works and how you can use it, I will cover how to make Aimbot today and it will be external.
So what do we need first? To create an aimbot you need the coords of the player.
[Things to find]
- Player Positions *(X, Y, Z)
- Player Team *So we can makechecks for the enemy team and compare it to our team, (So it only aims at enemies)
- Player Health *So it doesent aim at dead enemies
Ok so these are the main things we need for an aimbot so now im going to tell you how to get this information.
We need to find the pointer to CLocalPlayer and CBaseEntity, lets go ahead and find the CLocalPlayer pointer first.
Lets go ahead and attach Cheat Engine to CSS (I Hope you already know how to do that)
[Step1] - Create a BOT server *Join a team , Scan for your health, after you scanned go ahead and type this in CSS Console: Sv_Cheats 1;hurtme 22
-This will take down your health by 22 HP so you now got a diffrent HP Value you can goto cheat engine and type, then hit Next scan, do this about 2 times and then you will end up with something like this:
Ok go ahead and add the 8 last results into your Address Table:
Ok so once youre doing that you should view all of them in "memory viewer" *Select the result and hit "CTRL + B"
Do that on all of them....
If you find one with the value "03" (3 = CT, 2 = T, 1 = SPEC) Next to it you know thats the "Team" Value and the m_iTeamNum (Team Value) is 8 bytes away from your health (As I coverd in my CSS CBaseEntity Tutorial: https://guidedhacking.com/showthread.php?2620-Tut-CBaseEntity-CSS .) so if you see something like this you know you got the right one (The result with a red box around it):
Now you can go ahead and delete the other Address results from your "Address Table" ...
Ok so now when we've found the right address you can go to your "Address Table" and right click / Point scan for this address, Put the "nr of threads scanning as 1 and Max Level as 1":
Ok so when youre done pointer scanning it you will most likley end up with 5 results or more, Anything that doesent have the offset "90" is invaild beacuse if you goto Olly debug and open "client.dll" in your CSS Process and search for "m_iHealth" You can see the offset is 0x90, it might change by time tho. But for now its 0x90.
Ok so go ahead and add all 4 pointers to your "Address Table" With the offset 90 (By double clicking them)
Go ahead and open the first one in memory viewer "CTRL + B"
Then goto (Tools / Dissect data & structures "CTRL + D" ) Then click Structures-> Define a new structure or "CTRL + N", Call it anything you like.
You will now end up with a list looking like this:
This list holds all your information such as your position, health , team, viewangles, you name it... (If it is the right pointer).
Scroll down a little on the list while youre moving around ingame and if you see values changes while you move this might be the Position values.
a great thing you can do is to goto your console ingame and type "setpos 90 90 90" and then look for those values in the dissected data struct in cheatengine
(Would look something like this) :
Ok so the first value of the 3 coords we found (The 3 I pointed out in the picture) Is probobly the X Coord so double click the Offset (The value to the very left) and copy it, Open your calculator And selecret the (Programmer -> HEX) Mode and paste the value, then do that value + 90 (The reason we need to do this is because we started off from the health and we're not 100% In the beginning of the struct. so lets say our X Coord offset was 19C, it should now be 22C if you did 19C + 90 in your HEX Calculator..
[IMPORTANT]
- Go to your "Address Table" And double click the Address of the result and copy it, it will most likley be "client.dll + Address ( For me its 0x00780CD0) ", You only need the address so save it in a notepad..
- I will call it CLocalPlayer for now
So now we got PlayerPosition - 0x22C
We need team (this is a "NetVar" m_iTeamNum in olly I will make a tutorial on how to find those but the team will mostlikley be ) - 0x98
And the health - 0x90
If you wonder why I dont care about the Y and Z Coord. I will explaien that later in the tutorial, you dont actually need the offset for them.
[Things Collected]
- PlayerPosition (0x22C)
- Player Team (0x98)
- Player Health (0x90)
Ok so now comes the fun part, the coding
Before we start, I would like to say: I do assaume you have a basic programming knowlegde before doing this....
[Things to do]
- Create a new Win32 Console Application (Empty Project) And add a new header file (HackProcess.h)
- Set your debug mode to "Release"
- Go to your project properties and set your "Character set" from: "Use Unicode Character Set" to "Use Multi-Byte Character Set"
- In your HackProcess.h use this code (This is a very usefull header file you will find very usefull in your cheat programming future):
- Heres the code: https://pastebin.com/Fgqw4KEx (UPDATED)
- Ok so now create your Main.cpp, It should look something similar to this:
Lets create a little struct for our own player and a little function in there to read out our own information:
[Moving On...]
Now as you can see I wrote the Player Position into a Float array [3] and if you do have a basic programming knowledge you should know that 0 is 1, and 1 is 2... etc
Now what we did was reading out or position to a float array so:
MyPlayer.Position[0] would be our X Pos
MyPlayer.Position[1] would be our Z Pos
MyPlayer.Position[2] would be our Y Pos
Get it?
Ok so feel free to go to your while loop and print out your positions to test it...
Ok now lets go ahead to cheat engine again and check the address on one of your other results (if it dont work later you know you should have tried some other results) But hey! we only got 4 results and its not that much you need to re-code if you took the wrong one ( Change the Address in the reading
).........:
Ok so this address should be CBaseEntity, the struct we use to get other players information......
For me its 0x00751FFC.
Ok now lets create a player cycle for all the players on the server. And read out their information, but before we do that we need to make a struct to read the information from the player:
Now we need to Calculate our angles so lets use a function called CalcAngle.
Now we can create the player cycle:
And now we can finally Calculate our angles with the CalcAngle function and set our viewangles to our aimbotangle (witch will be calculated with the CalcAngle function)
Ok thanks everyone for watching this tutorial,
Here is how it will end up looking
https://www.youtube.com/watch?v=U0UX-yAxlZI
Download Source: https://www.mediafire.com/?m8jwny2fp1b1921
NEW HackProcess.h (Use): https://pastebin.com/Fgqw4KEx
So what do we need first? To create an aimbot you need the coords of the player.
[Things to find]
- Player Positions *(X, Y, Z)
- Player Team *So we can makechecks for the enemy team and compare it to our team, (So it only aims at enemies)
- Player Health *So it doesent aim at dead enemies
Ok so these are the main things we need for an aimbot so now im going to tell you how to get this information.
We need to find the pointer to CLocalPlayer and CBaseEntity, lets go ahead and find the CLocalPlayer pointer first.
Lets go ahead and attach Cheat Engine to CSS (I Hope you already know how to do that)
[Step1] - Create a BOT server *Join a team , Scan for your health, after you scanned go ahead and type this in CSS Console: Sv_Cheats 1;hurtme 22
-This will take down your health by 22 HP so you now got a diffrent HP Value you can goto cheat engine and type, then hit Next scan, do this about 2 times and then you will end up with something like this:

Ok go ahead and add the 8 last results into your Address Table:

Ok so once youre doing that you should view all of them in "memory viewer" *Select the result and hit "CTRL + B"
Do that on all of them....
If you find one with the value "03" (3 = CT, 2 = T, 1 = SPEC) Next to it you know thats the "Team" Value and the m_iTeamNum (Team Value) is 8 bytes away from your health (As I coverd in my CSS CBaseEntity Tutorial: https://guidedhacking.com/showthread.php?2620-Tut-CBaseEntity-CSS .) so if you see something like this you know you got the right one (The result with a red box around it):

Now you can go ahead and delete the other Address results from your "Address Table" ...
Ok so now when we've found the right address you can go to your "Address Table" and right click / Point scan for this address, Put the "nr of threads scanning as 1 and Max Level as 1":

Ok so when youre done pointer scanning it you will most likley end up with 5 results or more, Anything that doesent have the offset "90" is invaild beacuse if you goto Olly debug and open "client.dll" in your CSS Process and search for "m_iHealth" You can see the offset is 0x90, it might change by time tho. But for now its 0x90.
Ok so go ahead and add all 4 pointers to your "Address Table" With the offset 90 (By double clicking them)
Go ahead and open the first one in memory viewer "CTRL + B"
Then goto (Tools / Dissect data & structures "CTRL + D" ) Then click Structures-> Define a new structure or "CTRL + N", Call it anything you like.
You will now end up with a list looking like this:

This list holds all your information such as your position, health , team, viewangles, you name it... (If it is the right pointer).
Scroll down a little on the list while youre moving around ingame and if you see values changes while you move this might be the Position values.
a great thing you can do is to goto your console ingame and type "setpos 90 90 90" and then look for those values in the dissected data struct in cheatengine
(Would look something like this) :

Ok so the first value of the 3 coords we found (The 3 I pointed out in the picture) Is probobly the X Coord so double click the Offset (The value to the very left) and copy it, Open your calculator And selecret the (Programmer -> HEX) Mode and paste the value, then do that value + 90 (The reason we need to do this is because we started off from the health and we're not 100% In the beginning of the struct. so lets say our X Coord offset was 19C, it should now be 22C if you did 19C + 90 in your HEX Calculator..
[IMPORTANT]
- Go to your "Address Table" And double click the Address of the result and copy it, it will most likley be "client.dll + Address ( For me its 0x00780CD0) ", You only need the address so save it in a notepad..
- I will call it CLocalPlayer for now
So now we got PlayerPosition - 0x22C
We need team (this is a "NetVar" m_iTeamNum in olly I will make a tutorial on how to find those but the team will mostlikley be ) - 0x98
And the health - 0x90
If you wonder why I dont care about the Y and Z Coord. I will explaien that later in the tutorial, you dont actually need the offset for them.
[Things Collected]
- PlayerPosition (0x22C)
- Player Team (0x98)
- Player Health (0x90)
Ok so now comes the fun part, the coding
Before we start, I would like to say: I do assaume you have a basic programming knowlegde before doing this....
[Things to do]
- Create a new Win32 Console Application (Empty Project) And add a new header file (HackProcess.h)
- Set your debug mode to "Release"
- Go to your project properties and set your "Character set" from: "Use Unicode Character Set" to "Use Multi-Byte Character Set"
- In your HackProcess.h use this code (This is a very usefull header file you will find very usefull in your cheat programming future):
- Heres the code: https://pastebin.com/Fgqw4KEx (UPDATED)
- Ok so now create your Main.cpp, It should look something similar to this:

Lets create a little struct for our own player and a little function in there to read out our own information:

[Moving On...]
Now as you can see I wrote the Player Position into a Float array [3] and if you do have a basic programming knowledge you should know that 0 is 1, and 1 is 2... etc
Now what we did was reading out or position to a float array so:
MyPlayer.Position[0] would be our X Pos
MyPlayer.Position[1] would be our Z Pos
MyPlayer.Position[2] would be our Y Pos
Get it?
Ok so feel free to go to your while loop and print out your positions to test it...
C++:
MyPlayer.ReadInformation();
cout << "X: " << MyPlayer.Position[0] << endl;
cout << "Z: " << MyPlayer.Position[1] << endl;
cout << "Y: " << MyPlayer.Position[2] << endl;

Ok so this address should be CBaseEntity, the struct we use to get other players information......
For me its 0x00751FFC.
Ok now lets create a player cycle for all the players on the server. And read out their information, but before we do that we need to make a struct to read the information from the player:

Now we need to Calculate our angles so lets use a function called CalcAngle.
C++:
void CalcAngle( float *src, float *dst, float *angles )
{
double delta[3] = { (src[0]-dst[0]), (src[1]-dst[1]), (src[2]-dst[2]) };
double hyp = sqrt(delta[0]*delta[0] + delta[1]*delta[1]);
angles[0] = (float) (asinf(delta[2]/hyp) * 57.295779513082f);
angles[1] = (float) (atanf(delta[1]/delta[0]) * 57.295779513082f);
angles[2] = 0.0f;
if(delta[0] >= 0.0) { angles[1] += 180.0f; }
}

And now we can finally Calculate our angles with the CalcAngle function and set our viewangles to our aimbotangle (witch will be calculated with the CalcAngle function)
C++:
CalcAngle (MyPlayer.Position, PlayerList[i].Position, PlayerList[i].AimbotAngle); // The AimbotAngle is a float array [3] and its empty (Untill now)
if (GetAsyncKeyState(0x01)) // If you hit mouse1
WriteProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordEngine + 0x43140C), &PlayerList[i].AimbotAngle, 12, 0); //Writing our angles to the AimbotAngle, 0x43140C is our ViewAngles witch can be found in engine.dll, btw you cant use the viewangles in the CLocalPlayer Pointer
Here is how it will end up looking
Download Source: https://www.mediafire.com/?m8jwny2fp1b1921
NEW HackProcess.h (Use): https://pastebin.com/Fgqw4KEx
Attachments
You can download 0 Attachments
-
16.6 KB Views: 316
-
10.2 KB Views: 1,807
Last edited: