QuestionThirdperson with Hooked_OverrideView!

Posts 13 of 3 · Page 1 of 1
Thirdperson with Hooked_OverrideView!
Is it possible to make thirdperson with Hooked_OverrideView?
If it is please post a source.
If not post how.
its possible but way easier to do spoofing sv cheats

you can get a cvar class and a spoofcvar class from tgf source if you aren't lazy enough to look it up
Credits goes to requii and polandcheater

Code:
typedef void(__thiscall *FnOverrideView)(void* _this, CViewSetup* setup);
FnOverrideView oFnOverrideView;
void __fastcall hkOverrideView(void* _this, void* _edx, CViewSetup* setup);
 
 
void __fastcall hkOverrideView(void* _this, void* _edx, CViewSetup* setup)
{
	IClientEntity *pLocal = I::EntList->GetClientEntity(I::Engine->GetLocalPlayer());
	if (I::Engine->IsInGame() && pLocal)
	{
		static Vector vecAngles;
		I::Engine->SetViewAngles(vecAngles);
		int kuk = floor(Menu.Misc.ThirdpersonRange->GetValue());
		if (Menu.Misc.Thirdperson->GetBool() && pLocal->IsAlive())
		{
			if (!I::Input->m_fCameraInThirdPerson)
			{
				I::Input->m_fCameraInThirdPerson = true;
				I::Input->m_vecCameraOffset = Vector(vecAngles.x, vecAngles.y, kuk);
			}
		}
		else
		{
			I::Input->m_fCameraInThirdPerson = false;
			I::Input->m_vecCameraOffset = Vector(vecAngles.x, vecAngles.y, 0);
		}
	}
 
	oFnOverrideView(_this, setup);
}
Homework:
-There is one antipaste in this code. Fix it.
-Get Cinput class and interface

All infos you can get all around internet.
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?