QuestionError..

Posts 115 of 20 · Page 1 of 2
Error..
Hey everybody, i'm new to making hacks for CA NA. Umm.. I have an error: so i'm using Visual C++ 2008 and CodeNever's source, I run on Vista 32bit.

What I have:
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_NUMPAD0)<0){
chamsHack = !chamsHack;
if (chamsHack)
PushToConsole( "SkelModelStencil 1" );
else
PushToConsole( "SkelModelStencil 0" );
} 
}
Sleep(200);
}
Error:
Code:
1>------ Build started: Project: tdfd, Configuration: Debug Win32 ------
1>Compiling...
1>Base.cpp
1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd\tdfd\base.cpp(47) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\jonathan\documents\visual studio 2008\projects\tdfd\tdfd\base.cpp(24)' was matched
1>Build log was saved at "file://c:\Users\Jonathan\Documents\Visual Studio 2008\Projects\tdfd\tdfd\Debug\BuildLog.htm"
1>tdfd - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If you could help me fix it thanks alot! Well thanks for reading!

Oh and Please do not flame, I'm a noob :|
[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)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0){
gravityHack = !gravityHack;
if (gravityHack)
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
//NX Chams
if(GetAsyncKeyState(VK_NUMPAD0)<0){
chamsHack = !chamsHack;
if (chamsHack)
PushToConsole( "SkelModelStencil 1" );
else
PushToConsole( "SkelModelStencil 0" );
}
}
Sleep(200);
}
}[/php]


C&P this code into your project and it should work or just add " } " to the end of "your" code.
Quote Originally Posted by DethBlaze View Post
[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)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0){
gravityHack = !gravityHack;
if (gravityHack)
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
//NX Chams
if(GetAsyncKeyState(VK_NUMPAD0)<0){
chamsHack = !chamsHack;
if (chamsHack)
PushToConsole( "SkelModelStencil 1" );
else
PushToConsole( "SkelModelStencil 0" );
}
}
Sleep(200);
}
}[/php]


C&P this code into your project and it should work or just add " } " that to the end of "your" code.
No, I think the brace has to be the other way around like this "{" without the quotation marks. But i'm not sure.
Quote Originally Posted by Beatz View Post
No, I think the brace has to be the other way around like this "{" without the quotation marks.
I added his code to a project and it worked fine after i added "}" in the end if the code.
Quote Originally Posted by DethBlaze View Post
[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)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0){
gravityHack = !gravityHack;
if (gravityHack)
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
//NX Chams
if(GetAsyncKeyState(VK_NUMPAD0)<0){
chamsHack = !chamsHack;
if (chamsHack)
PushToConsole( "SkelModelStencil 1" );
else
PushToConsole( "SkelModelStencil 0" );
}
}
Sleep(200);
}
}[/php]


C&P this code into your project and it should work or just add " } " to the end of "your" code.
Alright thanks now I have no errors. But when I run PerX as admin (I run on Vista) then my process is Engine.exe, it auto injects. I run CA, it injects the my fail hotkey hack. I press Spacebar, the gravity hack doesn't work.. I press 1 on the NumPad, NX Chams doesn't work.. what is wrong? Other people's menu hacks AND NumPad hacks work for me, but not mine..

PLEASE HELP!
Quote Originally Posted by hgmf8124 View Post
Alright thanks now I have no errors. But when I run PerX as admin (I run on Vista) then my process is Engine.exe, it auto injects. I run CA, it injects the my fail hotkey hack. I press Spacebar, the gravity hack doesn't work.. I press 1 on the NumPad, NX Chams doesn't work.. what is wrong? Other people's menu hacks AND NumPad hacks work for me, but not mine..

PLEASE HELP!
Just wait a bit and ill test it out.


------------------------------------------------
Edit:

Wow.. this code is all fked up, this is not CN source. Ill fix it in a bit!!
Here is the source i fix it but i took out the hot keys copy & paste but give credit to CodeNever.

#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()
{
while(true)
{

PushToConsole("SkelModelStencil 1");
PushToConsole("ModelDebug_DrawBoxes 1");
PushToConsole("WeaponSway 0");
PushToConsole("PerturbRotationEffect 0.000000");
PushToConsole("PerturbIncreaseSpeed 0.000000");
PushToConsole("PerturbWalkPercent 0.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
memcpy((LPVOID)0x3741A550, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3740AA99, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A564, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A567, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A570, "\x90\x90\x90", 3);
memcpy((LPVOID)0x37466264, "\x90\x90\x90\x90\x90\x90", 6);
}}
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;
}
Quote Originally Posted by EDWINSEE View Post
Here is the source i fix it but i took out the hot keys copy & paste but give credit to CodeNever.
Thats just stupid hes making a "hotkey" hack not a auto on hack.


Here hgmf8124 i fixed you code up, it should work for you 100%!! Just C&P this code and it should work.


[php]#include <windows.h>

bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}

void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )(0x3778BFB0);
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}





void main()
{
bool chamsHack = false;
while(true)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0)
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
Sleep(200);


//NX Chams
if(GetAsyncKeyState(VK_NUMPAD0)<0){
chamsHack = !chamsHack;{
if (chamsHack) {
PushToConsole( "SkelModelStencil 1" );
}else{
PushToConsole( "SkelModelStencil 0" );
}
}
}
}
}


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]
you don't need a } b4 Sleep(200);
it should be
Code:
Sleep(200);
}
}
Quote Originally Posted by GodHack2 View Post
you don't need a } b4 Sleep(200);
it should be
Code:
Sleep(200);
}
}
I said it all ready, you need to read the whole fken page.

[php]#include <windows.h>

bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}

void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )(0x3778BFB0);
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}





void main()
{
bool chamsHack = false;
while(true)
{
//Gravity Hack
if(GetAsyncKeyState(VK_SPACE)<0)
PushToConsole( "PlayerGravity 800" );
else
PushToConsole( "PlayerGravity -800" );
Sleep(200);


//NX Chams
if(GetAsyncKeyState(VK_NUMPAD0)<0){
chamsHack = !chamsHack;{
if (chamsHack) {
PushToConsole( "SkelModelStencil 1" );
}else{
PushToConsole( "SkelModelStencil 0" );
}
}
}
}
}


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]


Again here's the code, reply back if it worked for you.
Quote Originally Posted by deathninjak0 View Post
You need to install directx SDK 2010
No he doesn't... wtf is wrong with you???
Yea It seems like you new to coding also...??
Quote Originally Posted by whit+ View Post
Yea It seems like you new to coding also...??
Who are you talking too? Me or uhmmm someone else?
Quote Originally Posted by DethBlaze View Post
Who are you talking too? Me or uhmmm someone else?
Threadstarter...Calm Down i wasnt flaming you
Posts 115 of 20 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?