Solved CSGO Memory structure

  • 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

x86asm

Jr.Coder
Full Member
Nobleman
Jan 3, 2013
53
438
0
Hello, how can I know which value is x y and z?


87d64gwmog3.png



I have reduced my code alot so that it is easier to see what i want to do.
I have decided me to write at first a little program which aims only on the enemy but my bot aims on everything but not on my enemy ...
I have read the player position and my own position with cheat engine. I there a problem with my x y z stuff?

My player pos x?y?z? = HP address - 0x48
Enemy player pos x?y?z? = Enemy HP address - 0x48

Would be nice if someone could give me a hint.

C++:
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{  
                               // x?y?z? 
float myPos[3] = {-1463.627441 , 64.03124237, 112.3842621 };
float ePos[3] = {102.125, -970.25, 20 };
float angles[3];
CalcAngle( myPos, ePos, angles );

cout<<angles[0]<<"\n";
cout<<angles[1]<<"\n";
cout<<angles[2]<<"\n";


unsigned addr = GetDllBaseAddress( ProcessId, ProcessName, "engine.dll" );
		 addr  = addr + 0x4ca9b8;

	// get the first pointer
	ReadProcessMemory( ProcessHandle, reinterpret_cast<void*>(addr), &addr, sizeof(float), 0);

	// calculate values to get the right view_angle address
	addr = addr + 0x8 + 0x4c80;
	// aim on enemy
	WriteProcessMemory( ProcessHandle, reinterpret_cast<void*>(addr), &angles[0], 12, 0);

			

system("PAUSE");

	return 0;
}

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

x86asm

Jr.Coder
Full Member
Nobleman
Jan 3, 2013
53
438
0
If I run around then I can see that these values are chaning. And if i look around with my mouse then I can see that these values are not changing.
So I think that these values are correct.
 

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
Hello, how can I know which value is x y and z?
Well, if you jump z should increase



Are you 100% sure you are reading the right addresses?
 

x86asm

Jr.Coder
Full Member
Nobleman
Jan 3, 2013
53
438
0
If I typ in csgo console: setpos 90 90 90

Then is my position:
ad8d9d8 = 90
AD8D9DC = 90
AD8D9E0 = 0.03125 <-- Thats looks strange o_O

I guess I should get 90 three times ... ( ad8d9d8 - 4 also not = 90 )


Oh, I guess I have it it was just a x y problem. Now it should work.

Thx alot guys. If I just think that it works then I will come back. ^_^
But at first I must clean up my code its sooooooo messy.
 
Last edited:

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
If I typ in csgo console: setpos 90 90 90

Then is my position:
ad8d9d8 = 90
AD8D9DC = 90
AD8D9E0 = 0.03125 <-- Thats looks strange o_O

I guess I should get 90 three times ... ( ad8d9d8 - 4 also not = 90 )


Oh, I guess I have it it was just a x y problem. Now it should work.

Thx alot guys. If I just think that it works then I will come back. ^_^
But at first I must clean up my code its sooooooo messy.
The CalcAngle looks good so don't worry about that (before you start messing with it :)).
 

x86asm

Jr.Coder
Full Member
Nobleman
Jan 3, 2013
53
438
0
Yeah, it works already nice against one enemy.^^
Now I work on the distance stuff. But my code was so amazing horrible messy ... I was scrolling through my code and just started to laugh. xD xD
So I have decide to write a clean code from 0. :trollface: (Ok, nearly zero I have still my old code and can take single functions and stuff from it.)
 
Last edited:
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