Tutorial CSS External Base AIMBOT with Source Code

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
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 :D

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? :D
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 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.

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; }
}
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)

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
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
 

Attachments

Last edited:

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
Excellent tutorial, the images aren't working for me, are you sure they are link right?

Fleep
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
Excellent tutorial, the images aren't working for me, are you sure they are link right?

Fleep
Hm I dont know what can be wrong, I can see them very well, actually. maybe its because I used the IMG Html format to show the images from uploaded webpage beacuse Personally I think they were abit too small to see with the insert Image option.
 

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
If you post the actual HTML for the image maybe we can fix those, also if its not too much trouble could you post the final solution. There may be people that just want to examine your code or want to use an aimbot for themselves, of course its up to you but from experience people will be much more thankful in the long run.
Edit:Changed the title also to help with searches

Fleep
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
Hm I dont know what can be wrong, I can see them very well, actually. maybe its because I used the IMG Html format to show the images from uploaded webpage beacuse Personally I think they were abit too small to see with the insert Image option.
Updated the thread with a download to the source.. But I really dont know how to fix this image issue, And I dont know how I can see them and the others cant, Thats very weird ;o I could possibly upload them with the insert image but they will be very small and you wont be able to see much what do you think?, also When it comes to CSS And uploading sources there are so many people that are looking for sources to actually sell almoast anything they got, CSS and cheat selling is WAY diffrent then other games.

-NubTIK
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
This aimbot does not have any so called "Visibiliy Check" So if you would try shoot it would mostlikley aim at them even if they are not visible
 

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
Updated the thread with a download to the source.. But I really dont know how to fix this image issue, And I dont know how I can see them and the others cant, Thats very weird ;o I could possibly upload them with the insert image but they will be very small and you wont be able to see much what do you think?, also When it comes to CSS And uploading sources there are so many people that are looking for sources to actually sell almoast anything they got, CSS and cheat selling is WAY diffrent then other games.

-NubTIK
Yh, It could be that your hosting in a registered site. Why not upload to somewhere like Photobucket or Imageshack those are well known for working.
Also thanks for the solution :)

Fleep
 

shuuk

Newbie
Full Member
May 25, 2012
26
298
0
Very nice thanks. Does it run under win 8 x64 ?
Btw. fleep i miss ur videot tuts :(
 
Last edited:

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
Ok I got the pics working but they are not in order, Let me fix that, Please dont get confused
 

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
Tested this myself last night with no luck, on debugging the code it seems to infinitely loop whenever GetModuleNamePointer() is called.
Unfortunately I only had a couple of minutes to play around with this, but I will come back to it soon to figure out why its not working for me.

If you know what the problem is I would appreciate some support as this should be interesting to test out, otherwise when I get a chance I will try to find the problem and report back here.

C++:
	void RunProcess()    	{
        runSetDebugPrivs();
        while (!FindProcessName("hl2.exe", &__gameProcess)) Sleep(12);
        while (!(getThreadByProcess(__gameProcess.th32ProcessID))) Sleep(12);
        __HandleProcess = OpenProcess(PROCESS_ALL_ACCESS, false, __gameProcess.th32ProcessID); 
        
         //HERE IS WHERE WE FIRST HUNG UP, this loop runs forever :/
        //while(__dwordClient == 0x0) __dwordClient = GetModuleNamePointer("client.dll", __gameProcess.th32ProcessID);
        //while(__dwordEngine == 0x0) __dwordEngine = GetModuleNamePointer("engine.dll", __gameProcess.th32ProcessID);






		//commented these for testing purposes
        //while(__dwordOverlay == 0x0) __dwordOverlay = GetModuleNamePointer("gameoverlayrenderer.dll", __gameProcess.th32ProcessID);
        //while(__dwordVGui == 0x0) __dwordVGui = GetModuleNamePointer("vguimatsurface.dll", __gameProcess.th32ProcessID);
        //while(__dwordLibCef == 0x0) __dwordLibCef = GetModuleNamePointer("libcef.dll", __gameProcess.th32ProcessID);
        //while(__dwordSteam == 0x0) __dwordSteam = GetModuleNamePointer("steam.dll", __gameProcess.th32ProcessID); 
        __HWNDCss = FindWindow(NULL, "Counter-Strike Source"); 
    }
Fleep
 

brinkz

Coder
Meme Tier VIP
Sep 3, 2012
209
1,688
12
Do you get a valid ProcessID? maybe show up your GetModuleNamePointer Function...
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
Tested this myself last night with no luck, on debugging the code it seems to infinitely loop whenever GetModuleNamePointer() is called.
Unfortunately I only had a couple of minutes to play around with this, but I will come back to it soon to figure out why its not working for me.

If you know what the problem is I would appreciate some support as this should be interesting to test out, otherwise when I get a chance I will try to find the problem and report back here.

C++:
	void RunProcess()    	{
        runSetDebugPrivs();
        while (!FindProcessName("hl2.exe", &__gameProcess)) Sleep(12);
        while (!(getThreadByProcess(__gameProcess.th32ProcessID))) Sleep(12);
        __HandleProcess = OpenProcess(PROCESS_ALL_ACCESS, false, __gameProcess.th32ProcessID); 
        
         //HERE IS WHERE WE FIRST HUNG UP, this loop runs forever :/
        //while(__dwordClient == 0x0) __dwordClient = GetModuleNamePointer("client.dll", __gameProcess.th32ProcessID);
        //while(__dwordEngine == 0x0) __dwordEngine = GetModuleNamePointer("engine.dll", __gameProcess.th32ProcessID);






		//commented these for testing purposes
        //while(__dwordOverlay == 0x0) __dwordOverlay = GetModuleNamePointer("gameoverlayrenderer.dll", __gameProcess.th32ProcessID);
        //while(__dwordVGui == 0x0) __dwordVGui = GetModuleNamePointer("vguimatsurface.dll", __gameProcess.th32ProcessID);
        //while(__dwordLibCef == 0x0) __dwordLibCef = GetModuleNamePointer("libcef.dll", __gameProcess.th32ProcessID);
        //while(__dwordSteam == 0x0) __dwordSteam = GetModuleNamePointer("steam.dll", __gameProcess.th32ProcessID); 
        __HWNDCss = FindWindow(NULL, "Counter-Strike Source"); 
    }
Fleep
Hm.. Thats really weird. I will look in to that today when I got some time (Probobly wont take long). I had the same problem not so long ago but somehow I got it working again , and the hackprocess.h im giving out is the working one, Let me install vs 2010 and see if there are any things that are diffrent and I will upload the hackprocess.h for 2010, Thanks for letting me know :)
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
Tested this myself last night with no luck, on debugging the code it seems to infinitely loop whenever GetModuleNamePointer() is called.
Unfortunately I only had a couple of minutes to play around with this, but I will come back to it soon to figure out why its not working for me.

If you know what the problem is I would appreciate some support as this should be interesting to test out, otherwise when I get a chance I will try to find the problem and report back here.

C++:
	void RunProcess()    	{
        runSetDebugPrivs();
        while (!FindProcessName("hl2.exe", &__gameProcess)) Sleep(12);
        while (!(getThreadByProcess(__gameProcess.th32ProcessID))) Sleep(12);
        __HandleProcess = OpenProcess(PROCESS_ALL_ACCESS, false, __gameProcess.th32ProcessID); 
        
         //HERE IS WHERE WE FIRST HUNG UP, this loop runs forever :/
        //while(__dwordClient == 0x0) __dwordClient = GetModuleNamePointer("client.dll", __gameProcess.th32ProcessID);
        //while(__dwordEngine == 0x0) __dwordEngine = GetModuleNamePointer("engine.dll", __gameProcess.th32ProcessID);






		//commented these for testing purposes
        //while(__dwordOverlay == 0x0) __dwordOverlay = GetModuleNamePointer("gameoverlayrenderer.dll", __gameProcess.th32ProcessID);
        //while(__dwordVGui == 0x0) __dwordVGui = GetModuleNamePointer("vguimatsurface.dll", __gameProcess.th32ProcessID);
        //while(__dwordLibCef == 0x0) __dwordLibCef = GetModuleNamePointer("libcef.dll", __gameProcess.th32ProcessID);
        //while(__dwordSteam == 0x0) __dwordSteam = GetModuleNamePointer("steam.dll", __gameProcess.th32ProcessID); 
        __HWNDCss = FindWindow(NULL, "Counter-Strike Source"); 
    }
Fleep
I already see the issue, lol I uploaded my old version of the HackProcess.h im terribly sorry for that, Im uploading the new one now to the thread sorry :)
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
Tested this myself last night with no luck, on debugging the code it seems to infinitely loop whenever GetModuleNamePointer() is called.
Unfortunately I only had a couple of minutes to play around with this, but I will come back to it soon to figure out why its not working for me.

If you know what the problem is I would appreciate some support as this should be interesting to test out, otherwise when I get a chance I will try to find the problem and report back here.

C++:
	void RunProcess()    	{
        runSetDebugPrivs();
        while (!FindProcessName("hl2.exe", &__gameProcess)) Sleep(12);
        while (!(getThreadByProcess(__gameProcess.th32ProcessID))) Sleep(12);
        __HandleProcess = OpenProcess(PROCESS_ALL_ACCESS, false, __gameProcess.th32ProcessID); 
        
         //HERE IS WHERE WE FIRST HUNG UP, this loop runs forever :/
        //while(__dwordClient == 0x0) __dwordClient = GetModuleNamePointer("client.dll", __gameProcess.th32ProcessID);
        //while(__dwordEngine == 0x0) __dwordEngine = GetModuleNamePointer("engine.dll", __gameProcess.th32ProcessID);






		//commented these for testing purposes
        //while(__dwordOverlay == 0x0) __dwordOverlay = GetModuleNamePointer("gameoverlayrenderer.dll", __gameProcess.th32ProcessID);
        //while(__dwordVGui == 0x0) __dwordVGui = GetModuleNamePointer("vguimatsurface.dll", __gameProcess.th32ProcessID);
        //while(__dwordLibCef == 0x0) __dwordLibCef = GetModuleNamePointer("libcef.dll", __gameProcess.th32ProcessID);
        //while(__dwordSteam == 0x0) __dwordSteam = GetModuleNamePointer("steam.dll", __gameProcess.th32ProcessID); 
        __HWNDCss = FindWindow(NULL, "Counter-Strike Source"); 
    }
Fleep
Ok so the one I posted with the pastebin (under download source) is the one thats working, so the main.cpp that comes with the project, you can use that just fine now if you use that HackProcess.h
 

saebur

Jr.Coder
Full Member
Nobleman
Aug 14, 2012
64
688
0
move this thread into tutorials and snippets? This deserves a sticky, rep+
 

NubTIK

Jr.Coder
Full Member
Nobleman
Dec 5, 2012
58
1,573
1
move this thread into tutorials and snippets? This deserves a sticky, rep+
Thanks! I cant seem to find how to move thread tho. I dont see the "Move Thread" Button net to the reply, quote etc.
 
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