You dont have the brackets after the gravity hack thing. Also this is my exact code i gave you. You didnt even try to fix it
Hey everybody, sorry for so many questions.. well I'm using CN's source. Then I build it when I finish and I inject it, nothing works (I press Space for Gravity Hack, I press 1 for NX Chams, none work..). And the weird thing is that, every OTHER hotkey/menu hack works for me.. I run on Vista 32bit.
Source:
When I build it, there are NO ERRORS. (Yesterday got help) But still, when I inject it, the keys don't work. And the weird thing is that, every OTHER hotkey/menu hack works for me.. I run on Vista 32bit.Code:#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); } }
SO, IF YOU COULD HELP ME, PLEASE COMMENT OR PM ME. THANKS! :(
You dont have the brackets after the gravity hack thing. Also this is my exact code i gave you. You didnt even try to fix it
It is true...he needs brackets...don't C+P
u forgot to label wat is true and false
[php]#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)
{
if(GetAsyncKeyState(VK_SPACE)<0 && gravityHack == true ){
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
gravityHack = false;
}
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;
}
[/php]
Now thank me little bastard.. :P I'm on someone elses computer so ya.. Test and see :P
Use this as an example. Tested and works.
[php]void main()
{
bool hack = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD0) < 0){
if( hack == false ){
PushToConsole("SkelModelStencil 1");
hack = true;
} else {
PushToConsole("SkelModelStencil 0");
hack = false;
}
}
Sleep(200);
}
}[/php]
[IMG]https://i516.photobucke*****m/albums/u330/richdude212-2.jpg[/IMG]
[IMG]https://i516.photobucke*****m/albums/u330/richdude212/leet.gif[/IMG]
Get NX Cash For Completing Offers Here! (will redirect)
Remember to press when people help you!
Not bad for $14.99 a month...
/Request Close
WHY? BECAUSE MINE WORKED??? O.O
Yep. You forgot the closing bracket on the space hotkey if statement.
I tryed. When I changed some things, it still didn't work. So that is why I put it back to default.
This has errors.
Code: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 ==========
I purposely put that there... Easy to fix... I'm not giving u c&p
I tryed fixing it..
Should it look like this?:
Code:#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; }