Solved Aimbot Math.

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
Hi guys, ım trying to do a simple aimbot.. i have x, y, z coordinates of player(me) and enemy. But ı cant calculate coordinates of cross hair.
This is what ım trying to do;
C++:
Vector between PlayerVector And Enemy Vector= (PlayerX-EnemyX), (PlayerY-EnemyY), (PlayerZ-EnemyZ)= (X, Y, Z)
Distance=sqrt(X^2+Y^2+Z^2)
For Crosshair X= arctan(Y/X)*180/PI
For Crosshair Y=arccos(Z/Distance)*180/PI
But this method didin't work, here is code in c++;
C++:
#include <iostream>
#include <windows.h>
#include <cmath>
using namespace std;
int main(){
	float PlayerX=0, PlayerY=0, PlayerZ=0, CrosshairX=0, CrosshairY=0, EnemyX=0, EnemyY=0, EnemyZ=0, X, Y, Z, AimX, AimY,Distance;
	HWND hwnd=FindWindowA(NULL, "Counter-Strike Source");
	DWORD procID;
	GetWindowThreadProcessId(hwnd, &procID);
	HANDLE handle=OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
	ReadProcessMemory(handle, (LPVOID)(0x6477AB70), &PlayerX, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x6477AB74), &PlayerY, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x6477AB78), &PlayerZ, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x660A32D4), &Corsshairx, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x660A32D8), &CrosshairY, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x6477AB94), &EnemyX, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x6477AB98), &EnemyY, sizeof(float), 0);
	ReadProcessMemory(handle, (LPVOID)(0x6477AB9C), &EnemyZ, sizeof(float), 0);
	X=DusmanX-PlayerX;
	Y=DusmanY-PlayerY;
	Z=DusmanZ-PlayerZ;
	Distance=sqrt(pow(X,2)+pow(Y,2)+pow(Z,2));
	AimX= atan(Y/X)*180/M_PI;
	AimY= acos(Z/Distance)*180/M_PI;	
	WriteProcessMemory(handle, (LPVOID)0x660A32D4, &AimX, sizeof(float), 0);
	WriteProcessMemory(handle, (LPVOID)0x660A32D8, &AimY, sizeof(float), 0);
	system("pause");
	return 0;
}
 

Lukor

ded
Meme Tier VIP
Fleep Tier Donator
Dec 13, 2013
496
5,753
25
you should use structures to combine consecutive addresses in one rpm
C++:
struct position{
  float x;
  float y;
  float z;
}

position playerpos = {0};

ReadProcessMemory(handle, (LPVOID)(0x6477AB70), &playerpos, sizeof(position), 0); //this will read x, y, z in 1 rpm
etc
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
Well what exactly is the issue? You saying it doesn't work doesn't really explain the problem... Are the angles being modified at all? Is the aimbot aiming at some random location?
Those look an awful lot like dynamic addresses but I hope I don't need to cover dynamic and static addresses right now and that you know what you're doing, somewhat at least.

Check out the Aimbot-Entity List Section, which is where this thread is being moved to actually. More focused.
There's a thread in there with multiple examples of CalcAngle functions for several different engines.
 

BrKTrM

Newbie
Full Member
Feb 9, 2017
12
48
0
Well what exactly is the issue? You saying it doesn't work doesn't really explain the problem... Are the angles being modified at all? Is the aimbot aiming at some random location?
Those look an awful lot like dynamic addresses but I hope I don't need to cover dynamic and static addresses right now and that you know what you're doing, somewhat at least.

Check out the Aimbot-Entity List Section, which is where this thread is being moved to actually. More focused.
There's a thread in there with multiple examples of CalcAngle functions for several different engines.
İ find out why its not working. Crosshair Adresses were wrong :(
 
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