Cara o correto seria:
[php]#include <process.h>
#include <windows.h>
#include <shellapi.h>
#include <fstream>
#pragma comment(lib,"shell32.lib")
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *Ltcliient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *Ltcliient + 0x377525F0);
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void MemCopy(void* Dest, const void* Src, int Len)
{
DWORD OldProtect;
DWORD OldProtect2;
VirtualProtect(Dest, Len, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy(Dest, Src, Len);
VirtualProtect(Dest, Len, OldProtect, &OldProtect2);
FlushInstructionCache(GetCurrentProcess(), Dest, Len);
}
void main()
{
while (!IsGameReadyForHook()){
Sleep(20);
}[/php]
Após isso, vc coloca seus hacks!
E depois finaliza