Actually I did try to define it but it didn't work.
Code with definitions in there:
[php]
#include <windows.h>
LPD3DXFONT pFont;
LPDIRECT3DDEVICE9 pDevice;
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void PTC(const char* Command) {
DWORD CNADDIE = 0x007d9200;
void* Send = ( void* )*( DWORD* )(CNADDIE);
__asm
{
/* CREDITS TO CN */
push Command;
call Send;
add esp, -3-1+2+6;
}
}
void main()
{
while(true)
{
//Hacks here (removed for length) but they all work.
}}
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 )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}
[/php]
coryster:
Errors with your code (not that you have errors but I do):
[php] 1 IntelliSense: name followed by '::' must be a class or namespace name c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 2
2 IntelliSense: identifier "LPDIRECT3DDEVICE9" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 2
3 IntelliSense: identifier "Directx" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 5
4 IntelliSense: identifier "D3DXCreateFontA" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 6
5 IntelliSense: identifier "Menu" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 8
6 IntelliSense: identifier "D3DCOLOR_ARGB" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 15
7 IntelliSense: identifier "Menu" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 16
8 IntelliSense: expected a ';' c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 20
9 IntelliSense: identifier "PTC" is undefined c:\users\main\documents\visual studio 2010\projects\6\6\base.cpp 61
[/php]