UnhappyWhats wrong with this plz :(

Posts 115 of 18 · Page 1 of 2
Whats wrong with this plz :(
no error compiling this was a correction to my original done by
@-Dimensions-
but it still ownt work
any ideas please im catching on really quickly but still a noob </3

Code:
#include <windows.h>
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"		) != NULL )
		return true;

	return false;
}
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* ) 0x377A0198;

	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}   
void main()
{
	if ( GetAsyncKeyState( VK_NUMPAD1 ) & 1 )
	{
		RunConsoleCommand("SkelModelStencil 1");
	}
}
DWORD WINAPI dwHackThread( LPVOID )
{
	while( !IsGameReadyForHook() )
		Sleep( 100 );

	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;
}
Quote Originally Posted by racardo View Post
no error compiling this was a correction to my original done by
@-Dimensions-
but it still ownt work
any ideas please im catching on really quickly but still a noob </3

Code:
#include <windows.h>
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"		) != NULL )
		return true;

	return false;
}
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* ) 0x377A0198;

	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}   
void main()
{
	if ( GetAsyncKeyState( VK_NUMPAD1 ) & 1 )
	{
		RunConsoleCommand("SkelModelStencil 1");
	}
}
DWORD WINAPI dwHackThread( LPVOID )
{
	while( !IsGameReadyForHook() )
		Sleep( 100 );

	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;
}
Address is wrong, use the address I gave you! Additionally use Booleans for the function..

Code:
bool fps = false;
void Main( void )
{
	if ( GetAsyncKeyState( VK_LBUTTON ) < 0 )
	{
		RunConsoleCommand( "ShowFps 1" );
		fps = true;
	}else{
		RunConsoleCommandh( "ShowFps 0" );
		fps = false;
	}
}
Quote Originally Posted by -Dimensions- View Post
Address is wrong, use the address I gave you! Additionally use Booleans for the function..

Code:
bool fps = false;

void Main( void )
{
	if ( GetAsyncKeyState( VK_LBUTTON ) < 0 )
	{
		RunConsoleCommand( "ShowFps 1" );
		fps = true;
	}else{
		RunConsoleCommandh( "ShowFps 0" );
		fps = false;
	}
}
For the last part, their is no point of setting fps to true or false as your not using it anywhere at all. I'm sure you know that you probably just typed it without thinking.

Code:
bool fps = false;
if ( GetAsyncKeyState( VK_LBUTTON ) < 0 )
	{
		fps = true;
	}else{
		fps = false;
	}

if(fps) {
RunConsoleCommand( "ShowFps 1" );
}else{
RunConsoleCommand( "ShowFps 0" );
}
one quick question the address u gave me is that like the address for the current ltc or whta cuz when i searche dthe forum the one i placed there is for the current ltc
where is GeModuleA ("Cshell.dll") ??
lol
------ Build started: Project: rickyV1, Configuration: Debug Win32 ------
Build started 8/4/2011 9:23:54 AM.
InitializeBuildStatus:
Touching "Debug\rickyV1.unsuccessfulbuild".
ClCompile:
RICKYV1.cpp
c:\users\ricky\documents\visual studio 2010\projects\rickyv1\rickyv1\rickyv1.cpp(34): error C3861: 'RunConsoleCommandh': identifier not found

Build FAILED.

Time Elapsed 00:00:03.16
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
whats wrong here
goddamnit fix it yourself
i fixed that but i went n inject but no fps or nx chams fml what wrong man

Code:
#include <windows.h>
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"		) != NULL )
		return true;

	return false;
}
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* )0x00485FA0;

	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}  
bool fps = false;
void main()
{
	if ( GetAsyncKeyState( VK_F10 ) &1)
	{
		RunConsoleCommand("SkelModelStencil 1");
	}

	if ( GetAsyncKeyState( VK_F11 ) < 0 )
	{
		RunConsoleCommand( "ShowFps 1" );
		fps = true;
	}else{
		RunConsoleCommand( "ShowFps 0" );
		fps = 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;
}

it builds correctly but when injected i get no nx chams or fps fml why is this so hard!!
Quote Originally Posted by racardo View Post
i fixed that but i went n inject but no fps or nx chams fml what wrong man

Code:
#include <windows.h>
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"		) != NULL )
		return true;

	return false;
}
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* )0x00485FA0;

	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}  
bool fps = false;
void main()
{
	if ( GetAsyncKeyState( VK_F10 ) &1)
	{
		RunConsoleCommand("SkelModelStencil 1");
	}

	if ( GetAsyncKeyState( VK_F11 ) < 0 )
	{
		RunConsoleCommand( "ShowFps 1" );
		fps = true;
	}else{
		RunConsoleCommand( "ShowFps 0" );
		fps = 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;
}

it builds correctly but when injected i get no nx chams or fps fml why is this so hard!!
There is no reason at all why you need to wait for Combat Arms d3d to load considering your not even writing d3d.
Don't bother, he just copy and pasted that code.
dude i didnt copy n paste anything deimensions been helping me out i had n original and he tweeked it cuz i was using PTC and he said tht is detected and dont post on my thread if its not something to help out im pretty sure at some point while u were learning u needed help

@Moochie
so basically my problem lies in the code were it waits for d3d9.dll to load?
Code:
#include <windows.h>
bool fps = false;
void __cdecl PassCMD( const char* cCommand)
{
	void* address = ( void* ) 0x485FA0;

	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}

void main()
{
	if ( GetAsyncKeyState( VK_F10 ) &1) // Yes this will activate it, however if Combat Arms changes the value back to 0 it will go off which would make you needing to press f10 everytime it goes off
	{
		PassCMD("SkelModelStencil 1");
	}

	if ( GetAsyncKeyState( VK_F11 )&1)
	{
		
		fps = true;
	}else{
		fps = false;
	}

	if(fps) {
	PassCMD( "ShowFps 1" );
	}else{
	PassCMD( "ShowFps 0" );
	}
}
DWORD WINAPI dwHackThread( LPVOID )
{
while(1) { // What this does is basically keeps going as long as it equals true and in C++ 1 is true all the time
main();
}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls( hDll );
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL ); // The Start of the dll calls Your HackThread which calls your main void	
}
return TRUE;
}
Credits:
You - Your Source Code
Me - Hand Typed some C++
PTC Method - I really have no clue I just ripped it out of CN's base.
PTC Updated Address - DeadLinez.
ty XD <3
No problem, if you need any more help private message me.

Solved
/close
@Moochie just one last thing i thinks its good but it crashes when the hackshield is loading it says combat arms has stopped working etc.....do you think its because there isnt a sleep function?
Posts 115 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?