Done?
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
typedef bool (*IsConnected_t)(void);
bool IsIngame()
{
DWORD* LTBase = (DWORD*)0x377F4930;
IsConnected_t pConnected = *(IsConnected_t*)(*LTBase + 0x8C);
return pConnected();
}
void RunConsoleCommand(char *command)
{
typedef int (__cdecl* RunConsoleCommand_t)(char *cmd);
RunConsoleCommand_t RCC = (RunConsoleCommand_t) 0x4A4750;
RCC(command);
delete command;
}
void main()
{
while(!IsGameReadyForHook()){
Sleep(200);
}
bool FPS = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD1)<0)
if(FPS){
RunConsoleCommand("ShowFPS 1");
FPS = false;
}else{
RunConsoleCommand("ShowFPS 0");
FPS = true;
}
while(!IsIngame());
}
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0,NULL);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
Turns hax off automatically after game closes and check's for in game status as well as game ready.
let me know what to fix