FRUSTRATED!
UGH! I am getting frustrated! I made a hack that uses hot keys. With the help of Alessandro, I have been able to not d/c when testing it. Now none of the fking hacks work! Somebody please help. No compiling errors, no Combat Arms errors, they just don't work when the correct button is pushed. Here is the code.
Code:
#include <windows.h>
bool chams = false;
bool cross = false;
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* )( 0x37817E30 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main() {
while(true) {
if(GetAsyncKeyState(VK_NUMPAD1)&1){
chams =! chams;
}
if(chams)
{
PushToConsole("SkelModelStencil 1");
} else {
PushToConsole("SkelModelStencil 0");
}
if(GetAsyncKeyState(VK_NUMPAD2)&1){
cross =! cross;
}
if(cross) {
PushToConsole("CrossHairR 255");
} else {
PushToConsole("CrossHairR 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;
}



