#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void PushToConsole(const char* Command) {
DWORD CNADDIE = 0x007d9200;
void* Send = ( void* )*( DWORD* )(CNADDIE);
__asm
{
push Command;
call Send;
add esp, -3-1+2+6;
}
}
void main()
{
bool gravityHack = false;
bool chamsHack = false;
while(true)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0){
gravityHack = !gravityHack;
if (gravityHack)
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
//NX Chams
if(GetAsyncKeyState(VK_NUMPAD1)<0){
chamsHack = !chamsHack;
if (chamsHack)
PushToConsole( "SkelModelStencil 1" );
else
PushToConsole( "SkelModelStencil 0" );
}
}
Sleep(200);
}
}

1>------ Build started: Project: tdfd2, Configuration: Debug Win32 ------
1>Compiling...
1>Base.cpp
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(28) : error C2181: illegal else without matching if
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(34) : error C2181: illegal else without matching if
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2059: syntax error : '}'
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2143: syntax error : missing ';' before '}'
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2059: syntax error : '}'
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(41) : error C2143: syntax error : missing ';' before '{'
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(41) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(52) : error C2065: 'dwHackThread' : undeclared identifier
1>Build log was saved at "file://c:\Users\Jonathan\Documents\Visual Studio 2008\Projects\tdfd2\tdfd2\Debug\BuildLog.htm"
1>tdfd2 - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" )!= NULL
&& GetModuleHandleA( "ClientFX.fxd" )!= NULL
&& GetModuleHandleA( "CShell.dll" )!= NULL )
return true;
return false;
}
void PushToConsole(const char* Command) {
DWORD CNADDIE = 0x007d9200;
void* Send = ( void* )*( DWORD* )(CNADDIE);
__asm
{
push Command;
call Send;
add esp, -3-1+2+6;
}
}
void main()
{
bool gravityHack = false;
bool chamsHack = false;
while(true)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0 && gravityHack == true ){
PushToConsole( "PlayerGravity 800" );
}else{
PushToConsole( "PlayerGravity -800" );
gravityHack = false;
}
//NX Chams
if(GetAsyncKeyState(VK_NUMPAD1)<0 && chamsHack == false){
PushToConsole( "SkelModelStencil 1" );
}else{
PushToConsole( "SkelModelStencil 0" );
chamsHack = true;
}
}
}
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;
}