ChappyCSTLN
Member
- Joined
- Nov 12, 2017
- Messages
- 18
- Reaction score
- 5
Hi, I would like to be helped me to make the smoothness of the aim bot be grateful if you can throw the finished code, thanks
Code:
#include <windows.h>
#include <math.h>
void main()
{
DWORD* pTarget = (DWORD*)0xB6F3B8;
DWORD* pActor = (DWORD*)0xB6F5F0;
DWORD* pCamera = (DWORD*)0xB6F99C;
float* camXpos = (float*)0xB6F258;
while(1)
{
if(*pActor > 0)
{
char* pVehicle = (char*)((*pActor) + 0x46C);
if(*pVehicle != 1)
{
DWORD* pMtrx1 = (DWORD*)((*pActor) + 0x14);
float* xPos1 = (float*)((*pMtrx1) + 0x30);
float* yPos1 = (float*)((*pMtrx1) + 0x34);
float* CxPos1 = (float*)(0xB6F9CC);
float* CyPos1 = (float*)(0xB6F9D0);
float xPoint = *CxPos1;
float yPoint = *CyPos1;
int* keyt = (int*)0xB7347A;//Left mouse key
DWORD* pPed = (DWORD*) ((*pTarget) + 0x79C);
if(*pPed > 0) {
DWORD* pMtrx2 = (DWORD*)((*pPed) + 0x14);
float* xPos2 = (float*)((*pMtrx2) + 0x30);
float* yPos2 = (float*)((*pMtrx2) + 0x34);
float xPos2a;
float yPos2a;
float* playerHP = (float*)((*pPed) + 0x540);
if(*playerHP > 0){
xPos2a = *xPos2;
yPos2a = *yPos2;
float Aa = fabs(xPoint-xPos2a);
float Ab = fabs(yPoint-yPos2a);
float Ac = sqrt(Aa*Aa*Aa+Ab*Ab);
float alpha = asin(Aa/Ac);
float beta = acos(Aa/Ac);
if((*xPos1 > *xPos2)&&(*yPos1 < *yPos2)){beta = -beta;}
if((*xPos1 > *xPos2)&&(*yPos1 > *yPos2)){beta = beta;}
if((*xPos1 < *xPos2)&&(*yPos1 > *yPos2)){beta = (alpha + (1.5707));}
if((*xPos1 < *xPos2)&&(*yPos1 < *yPos2)){beta = (-alpha - (1.5707));}
if(*keyt > 0){
*camXpos = beta+0.0389;
}
}
}
}
}
Sleep(10);
}
ExitThread(0);
}