FOV Aim Help?

Posts 1–10 of 10 · Page 1 of 1
FOV Aim Help?
Code:
void FovAimbot() {
	if (GetAsyncKeyState(AimKey)) {
		int BestIndex;
		float LastAngle[3];
		for (int i = 0; i < 64; i++) {
			EntityPlayer.Base(i);
			if (!EntityPlayer.isDormant() && EntityPlayer.EntityTeam() != LocalPlayer.LocalTeam() && EntityPlayer.EntityHealth() > 0 && EntityPlayer.Player != NULL && (EntityPlayer.EntityTeam() == 2 || EntityPlayer.EntityTeam() == 3)) {
				CalcAngle(LocalPlayer.Head, HeadPos, EntityPlayer.Angle, EntityPlayer.Flags());
				if (LastAngle == NULL) {
					LastAngle[0] = EntityPlayer.Angle[0];
					LastAngle[1] = EntityPlayer.Angle[1];
					LastAngle[2] = EntityPlayer.Angle[2];
					BestIndex = i;
				}
				if (LastAngle[0] > EntityPlayer.Angle[0], LastAngle[1] > EntityPlayer.Angle[1]) {
					LastAngle[0] = EntityPlayer.Angle[0];
					LastAngle[1] = EntityPlayer.Angle[1];
					LastAngle[2] = EntityPlayer.Angle[2];
					BestIndex = i;
				}
			}
		}
		EntityPlayer.Base(BestIndex);
		Vector3 Temp = {
			EntityPlayer.Angle[0],
			EntityPlayer.Angle[1],
			EntityPlayer.Angle[2]
		};

		SetViewAngles(Temp);
	}
}
Could someone help me out and tell me where I'm going wrong? It's locking to a random angle and I don't understand why.
Post how you get your LocalPlayer.Head.
Quote Originally Posted by WasserEsser View Post
Post how you get your LocalPlayer.Head.
Code:
Head[0] = RPM<float>(localBase + m_vecOrigin) + RPM<float>(localBase + m_vecViewOffset);
Head[1] = RPM<float>(localBase + m_vecOrigin + 0x4) + RPM<float>(localBase + m_vecViewOffset + 0x4);
Head[2] = RPM<float>(localBase + m_vecOrigin + 0x8) + RPM<float>(localBase + m_vecViewOffset + 0x8);
Quote Originally Posted by Buttars0070 View Post
Code:
Head[0] = RPM<float>(localBase + m_vecOrigin) + RPM<float>(localBase + m_vecViewOffset);
Head[1] = RPM<float>(localBase + m_vecOrigin + 0x4) + RPM<float>(localBase + m_vecViewOffset + 0x4);
Head[2] = RPM<float>(localBase + m_vecOrigin + 0x8) + RPM<float>(localBase + m_vecViewOffset + 0x8);
And where do you set HeadPos?
Quote Originally Posted by WasserEsser View Post
And where do you set HeadPos?
void BoneBaseF() {
BoneBase = RPM<uintptr_t>(EntityPlayer.Player + m_dwBoneMatrix);
GetBonePos(BoneBase, 6, HeadPos);
}

And I never call it :| Kek you think this is the issue?

444 posts @WasserEsser
Quote Originally Posted by Buttars0070 View Post
void BoneBaseF() {
BoneBase = RPM<uintptr_t>(EntityPlayer.Player + m_dwBoneMatrix);
GetBonePos(BoneBase, 6, HeadPos);
}

And I never call it :| Kek you think this is the issue?

444 posts @WasserEsser
That's why i asked you

Call it after you call Base( i );
Quote Originally Posted by WasserEsser View Post
That's why i asked you

Call it after you call Base( i );
Done an done, doens't work :P always return 'bestIndex' as 10 for some reason.

- - - Updated - - -

Code:
void FovAimbot() {
	if (GetAsyncKeyState(AimKey)) {
		int BestIndex;
		float LastAngle[3];
		for (int i = 0; i < 32; i++) {
			EntityPlayer.Base(i);			
			if ( EntityPlayer.Player != NULL && !EntityPlayer.isDormant() && EntityPlayer.EntityTeam() != LocalPlayer.LocalTeam() && EntityPlayer.EntityHealth() > 0  && (EntityPlayer.EntityTeam() == 2 || EntityPlayer.EntityTeam() == 3)) {
				BoneBaseF();
				CalcAngle(LocalPlayer.Head, HeadPos, EntityPlayer.Angle, EntityPlayer.Flags());
				if (LastAngle == NULL) {
					LastAngle[0] = EntityPlayer.Angle[0];
					LastAngle[1] = EntityPlayer.Angle[1];
					LastAngle[2] = EntityPlayer.Angle[2];
					BestIndex = i;
				}
				if (LastAngle[0] > EntityPlayer.Angle[0], LastAngle[1] > EntityPlayer.Angle[1]) {
					LastAngle[0] = EntityPlayer.Angle[0];
					LastAngle[1] = EntityPlayer.Angle[1];
					LastAngle[2] = EntityPlayer.Angle[2];
					BestIndex = i;
				}
			}
		}
		EntityPlayer.Base(BestIndex);
		BoneBaseF();
		Vector3 Temps = {
			EntityPlayer.Angle[0],
			EntityPlayer.Angle[1],
			EntityPlayer.Angle[2]
		};

		SetViewAngles(Temps);
	}
}

PS None of my offsets are out of date are they?
Code:
DWORD_PTR m_dwLocalPlayer = 0xA30504;
DWORD_PTR m_dwEntityList = 0x4A4BA64;
DWORD_PTR m_dw_MouseEnable = 0xA35D68;
DWORD_PTR m_dw_GlowObject = 0x4F6195C;

DWORD_PTR m_dwClientState = 0x5B6304;
DWORD_PTR m_dwViewAngles = 0x4D0C;
DWORD_PTR dw_iJump = 0x4EE0D38;

DWORD m_dwBoneMatrix = 0x2698;

DWORD_PTR m_iGlowIndex = 0xA310;
DWORD_PTR m_dwViewMatrix = 0x4A3D4C4;
DWORD_PTR m_dwLocalPlayerIndex = 0x178;
DWORD_PTR m_flFlashDuration = 0xA2F8;
DWORD_PTR dw_FlashMaxAlpha = 0xA2F4;

DWORD_PTR m_iCrossHairID = 0xAA44;
DWORD_PTR m_iShotsFired = 0xA2B0;
DWORD_PTR m_vecPunch = 0x3018;

DWORD DT_CSPlayerResource = 0x2E89A90;
DWORD m_iCompWins = 0x1B48;
DWORD m_iCompRanking = 0x1A44;
DWORD m_iPing = 0xAE4;

// Does not change on updated, in other words, no need to update these!
DWORD_PTR m_iTeamNum = 0xF0;
DWORD_PTR m_iHealth = 0xFC;
DWORD_PTR m_ArmorValue = 0xA9E8;
DWORD_PTR m_eLoopDist = 0x10;
DWORD_PTR dw_fFlags = 0x100;
DWORD_PTR m_vecViewOffset = 0x104;
DWORD_PTR m_vecOrigin = 0x134;
DWORD_PTR dw_bSpotted = 0x939;
DWORD_PTR dw_bDormant = 0xE9;
@WasserEsser
The flow of your aimbot is wrong.

First of all, checking if the angle is bigger than the old angle is not correct, you're dealing with angles here. That's why you're getting 10 every time.
Check for the delta angle instead. ( ViewAngles - CalculatedAngle ), and check if it's closer than the ones before.

You are using using EntityPlayer.Angle as the angle to aim at, which is the very last angle you've calculated, not the one that belongs to the player you want to aim at.

Also, if i'm not responding, don't mention me. I will get to your thread eventually when i have the time for it.
Quote Originally Posted by WasserEsser View Post
The flow of your aimbot is wrong.

First of all, checking if the angle is bigger than the old angle is not correct, you're dealing with angles here. That's why you're getting 10 every time.
Check for the delta angle instead. ( ViewAngles - CalculatedAngle ), and check if it's closer than the ones before.

You are using using EntityPlayer.Angle as the angle to aim at, which is the very last angle you've calculated, not the one that belongs to the player you want to aim at.

Also, if i'm not responding, don't mention me. I will get to your thread eventually when i have the time for it.
Now, after revising, I came up with this. Still only gets one number but now it's 6 for some reason.

I figured it out now and coded it and got it working completely, so many thanks @WasserEsser, you da bomb.

/Solved, Close

PS I only mentioned you because I didn't know if the quote sent you a notification which now I know did :P You usually respond so quickly it threw me off. Thanks though.
/Solved & closed.
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?