Aimbot randomly aiming

Posts 1–15 of 17 · Page 1 of 2
Aimbot randomly aiming
Hi,
I want to implement an aimbot to my cheat, but the problem is is that for some reason when there is no enemy around it starts aiming at a specific point that is always the same. Gif of this happening after I kill the last enemy around me;


I have no clue how to fix this, does anyone have an idea?
Are you checking for dormant?
Quote Originally Posted by ActualCheats View Post
Are you checking for dormant?
Yeah, code for closest enemy to the crosshair;

int ClosestEnemyToCrosshair(float maxfov)
{
int index;
for (int i = 0; i < 64; i++)
{
DWORD LocalPlayer = Mem.Read <DWORD>(Client + 0x00A31504);
DWORD entitybase = Mem.Read<DWORD>(Client + EntityList + (i * 0x10));
if (entitybase == LocalPlayer)
continue;
bool entitydormant = Mem.Read<bool>(entitybase + isDormant);
if (entitydormant)
continue;

int entityteam = Mem.Read<int>(entitybase + m_iTeamNum);

int LocalTeam = Mem.Read<int>(LocalPlayer + m_iTeamNum);
if (entityteam == LocalTeam)
continue;


int entitylifestate = Mem.Read<byte>(entitybase + 0x0000025B); //is lifestate
if (entitylifestate != 0)
continue;

DWORD clientstate = Mem.Read<DWORD>(Engine + clientState);
Vec3 currentangles = Mem.Read<Vec3>(clientstate + viewAngle);
Vec3 pos = BonePos(entitybase, 0x00002698, aimbone); //bonematrix
float entitydistance = GetFOV(currentangles, position, pos);
if (entitydistance < maxfov)
{
maxfov = entitydistance;
index = i;
}
}
return index;
}
The position you're aiming at is 0, 0, 0.

You should check if the entitybase itself is valid.

Code:
if ( !EntityBase ) continue;
Quote Originally Posted by WasserEsser View Post
The position you're aiming at is 0, 0, 0.

You should check if the entitybase itself is valid.

Code:
if ( !EntityBase ) continue;
And how exactly can I check if the position I'm going to aim at is 0,0,0?
Try to check :

Code:
if(entitybase  != 0)
My aimbot did the same thing sometimes.
As i said before, check the entity base. If you read 0 and later on read 0 + E9 for dormant, you might end up in as 0 initialized memory, since you want dormant to be 0 you'll read an as zero initialized position aswell, which makes you aim at the map origin.
Thanks, got it working now, added this to the aimbot code;

if (entindex == 0)
continue;
But now, the problem is is that the aimbot wants to aim at players through walls. How to fix this problem?
This is how i would do mine, since checking their health and dormant loops them through entitylist.
Code:
int Target = int ClosestEnemyToCrosshair( maxfov );

if (Player->Dormant( Target ) || Player->Health( Target  ) < 1 || Player->Teammate( Target ))
    continue; //or set the target to -1.


    //Calculations here.


Local->SetViewAngles( Vector( Target ) );
Quote Originally Posted by derkrasseboy View Post
bsp parsing
I'm external
Quote Originally Posted by F4DE View Post
I'm external
That's exactly why you should use BSP parsing.
Quote Originally Posted by WasserEsser View Post
That's exactly why you should use BSP parsing.
Ah allright, never actually heard of BSP parsing ;l Are there any resources / tutorials about it? Searched on MPGH and other forums but can't actually find any
Quote Originally Posted by F4DE View Post
Ah allright, never actually heard of BSP parsing ;l Are there any resources / tutorials about it? Searched on MPGH and other forums but can't actually find any
You should definitely increase your searching skills, there are plenty of resources about it, even a whole wiki pageⓘ about it.
Use RayTracing ( internally ), BSP parsing ( externally ) or the m_bSpottedByMask ( both ) netvar.
Information and sample code about all of these can be found online.
Posts 1–15 of 17 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us