wrong place mate
Okay, so... I'm new to hacking (please don't flame me, i'm trying and learning )
So, This is my code:
It is pretty much auto-on chams (I set out for it to be that, at least...)Code:#include <windows.h> bool IsGameReadyForHook() { if( GetModuleHandleA( "d3d9.dll" ) != NULL && GetModuleHandleA( "ClientFX.fxd" ) != NULL && GetModuleHandleA( "CShell.dll" ) != NULL ) return true; return false; } void CPush(constchar* cmd) { _asm { PUSH cmd MOV EAX, 0x00485FA0 CALL EAX ADD ESP, 0x4 } } void main() { while(true) { PushToConsole("SkelModelStencil 1"); } } 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; }
But when I go to build, I get:
Can anyone please help me? I'm completely lost. I think I have the right unwrapp console code.... And I think I have it in there right, I'm just not sure what I did wrong...Code:error C2065: 'constchar' : undeclared identifier error C2065: 'cmd' : undeclared identifier error C2448: 'CPush' : function-style initializer appears to be a function definition error C3861: 'PushToConsole': identifier not found
wrong place mate
.
Skype:
MPGH.dllbaseII
Heres credits:Code://You may want to use a class for the RunConsoleCommand, IsInGame, Main, and IsGameReadyForHook Functions. /* Just in case you decide adding some stuff. #include <d3d9.h> #include <d3dx9.h> #include <d3dx9core.h> #include <fstream> #include <iostream> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <Winuser.h> */ #include <windows.h> void __cdecl RunConsoleCommand( const char* cCommand ) { void* address = ( void* )0x00485FA0; //Unwrapped Console Address __asm { Push cCommand call address add esp, 0x4 } } bool IsInGame() { switch(*(int*)0x377B11B0) //Game Status Address { case 1: return true; //Your in a game case 5: return false; //Your in the lobby } return false; //Even if you aren't } void main( void ) { while ( true ) { if ( IsInGame == true /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ ) { this->RunConsoleCommand( "SkelModelStencil 1" ); //On }else{ this->RunConsoleCommand( "SkelModelStencil 0" ); //Off } } } bool IsGameReadyForHook() { if( GetModuleHandleA( "d3d9.dll" ) != NULL && GetModuleHandleA( "ClientFX.fxd" ) != NULL && GetModuleHandleA( "CShell.dll" ) != NULL ) return true; return false; } DWORD WINAPI dwHackThread( LPVOID ) { while ( !IsGameReadyForHook() ) Sleep( 25 ); main(); return EXIT_SUCCESS; } 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; }
Me, DeadLine, Flameswort10, Gellin.
Much neater and if you get a error fix it yourself.
Those were the easiest errors to fix ever, but I'm guessing your a noobie.
I'm not going to flame or troll b/c that not me.
Additionally like DLLBaseII said, wrong section.
Make sure its MultiByte in the Project Properties.
Consider my assistance expired. Bye.
Last edited by -Dimensions-; 07-30-2011 at 01:51 PM.
blackdragon4661 (07-30-2011)
Thank you so much, and yes, I am a noobie :/ But i'm trying to learn. I searched google for those errors but nothing popped up. Thank you for not trolling, and actually helping
Last edited by blackdragon4661; 07-30-2011 at 01:51 PM.
Once again, press Thanks if I helped.
Skaterforeva1 (07-31-2011)
You errors, in friendly descriptions, are:
- 'constchar' : undeclared identifier
- 'cmd' : undeclared identifier
- 'CPush' : function-style initializer appears to be a function definition
- 'PushToConsole': identifier not found
(pretty obvious lol)
You copy - pasted some random functions into your compiler and expected it to work. Whats even sadder is that you googled the errors l0l.
=>Code:void CPush(constchar* cmd)
as freedompeace said, the error messages got all infos u need to fix the problem.Code:void PushToConsole(const char* cmd)
constchar doesnt exist in c++, its const char. the reason why the error log also says that "cmd" is an undeclared identifier is because constchar doesnt exist.