SolvedCSGO Memory structure

x86asm

Jr.Coder
Full Member
Nobleman
Hello, how can I know which value is x y and z?

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

// get the first pointer

// calculate values to get the right view_angle address
// 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
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
Hello, how can I know which value is x y and z?
Well, if you jump z should increase

x86asm

Jr.Coder
Full Member
Nobleman
If I typ in csgo console: setpos 90 90 90

Then is my position:
AD8D9E0 = 0.03125 <-- Thats looks strange

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
If I typ in csgo console: setpos 90 90 90

Then is my position:
AD8D9E0 = 0.03125 <-- Thats looks strange

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
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. (Ok, nearly zero I have still my old code and can take single functions and stuff from it.)

Last edited:
Attention! Before you post:

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