I been working on a hot key hack. I do not D\C but the hacks will not turn on when I press the hot key in a game I try look at the hook. I did inject right because the message box show and goes to this website when the hacks are injected .if I need to hook the hot keys in a D3D base can some1 show me how to make detours or update detours. here is the source:

Code:
#include <windows.h>
#include <stdio.h>

#define EngLtc 0x004F9E00

bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"     ) != NULL
		&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
        && GetModuleHandleA( "CShell.dll"   ) != NULL )
		return true;
	return false;
}
void __cdecl Put_It_IN(char* szVal)
{
	if ( GetModuleHandleA( "CShell.dll"   ) != NULL )
	{
		void* vSetVar = (void*)EngLtc;
		__asm
		{
			mov eax, vSetVar;
			push szVal;
			call eax;
			add esp, 4;
		}
	}
}
void main()
{
	if(*(int*)0x37829B4C == 1){
		{
			bool HackStatus = false;
			while(true)
			{
				if(GetAsyncKeyState(VK_INSERT)<0 && HackStatus == true ){
					Put_It_IN("ShowFps 1");
					Sleep(50);
					Put_It_IN("SkelModelStencil 1" );
					Sleep(50);
					Put_It_IN("FogEnable 0" );
					Sleep(50);
					Put_It_IN("PerturbRotationEffect  0.000000"); 
					Sleep(50);
					Put_It_IN("PerturbIncreaseSpeed 0.000000");
					Sleep(50);
					Put_It_IN("PerturbWalkPercent 0.000000");
					Sleep(50);
					Put_It_IN("PerturbFiringIncreaseSpeed 0.000000");
					Sleep(50);
					memcpy((LPVOID)no recoil1, "\x90\x90\x90", 3);
					Sleep(50);
					memcpy((LPVOID)no recoil2, "\x90\x90\x90", 3);
					Sleep(50);
					memcpy((LPVOID)no recoil3, "\x90\x90\x90", 3);
					Sleep(50);
					memcpy((LPVOID)no recoil4, "\x90\x90\x90", 3);
					Sleep(50);
					memcpy((LPVOID)no recoil5, "\x90\x90\x90", 3);
					Sleep(50);
					memcpy((LPVOID)name tag1, "\x90\x90", 2);
					Sleep(50);
					memcpy((LPVOID)name tag2, "\x90\x90", 2);
					Sleep(50);
				}
				if(*(int*)0x37829B4C == 5){
					{
						bool HackStatus = true;
						while(false)
						{
							if(GetAsyncKeyState(VK_INSERT)<0 && HackStatus == true ){
								Put_It_IN("ShowFps 0");
								Sleep(50);
								Put_It_IN("SkelModelStencil 0" );
								Sleep(50);
								Put_It_IN("FogEnable 1" );
								Sleep(50);
								Put_It_IN("PerturbRotationEffect  3.000000"); 
								Sleep(50);
								Put_It_IN("PerturbIncreaseSpeed 3.000000");
								Sleep(50);
								Put_It_IN("PerturbWalkPercent 9.000000");
								Sleep(50);
								Put_It_IN("PerturbFiringIncreaseSpeed 0.500000");
								Sleep(50);
								memcpy((LPVOID)no recoil1, "\x00\x00\x00", 3);
								Sleep(50);
								memcpy((LPVOID)no recoil2, "\x00\x00\x00", 3);
								Sleep(50);
								memcpy((LPVOID)no recoil3, "\x00\x00\x00", 3);
								Sleep(50);
								memcpy((LPVOID)no recoil4, "\x00\x00\x00", 3);
								Sleep(50);
								memcpy((LPVOID)no recoil5, "\x00\x00\x00", 3);
								Sleep(50);
								memcpy((LPVOID)name tag1, "\x00\x00", 2);
								Sleep(50);
								memcpy((LPVOID)name tag2, "\x00\x00", 2);
							}
						}
					}
				}
			}
		}
	}
}
DWORD WINAPI dwHackThread(LPVOID)
{
	while( !IsGameReadyForHook())
		Sleep(100);
	main();
	return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		if( MessageBox(0, TEXT("Is MPGH #1 ???"), TEXT("ProGamerX`s Hacks"), MB_YESNO)==IDYES)
			system("start https://www.mpgh.net/");
		CreateThread(NULL, NULL,dwHackThread, NULL, NULL, NULL);
	}
	return TRUE;
}
It is noob proof I remove the addresses and change the bytes because of leechers.

Credit topblast for the PTC, flashlight95 for the gamestatus, Departure for the Engine LTC, me and others.