DC First hack...

Posts 17 of 7 · Page 1 of 1
DC First hack...
hey guys, I made my first hack, here it is, but It disconnects me when I run combat arms.

Code:
#include <windows.h>
bool cross = false;
bool chams = 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* )( 0x3778BFB0 );
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;
}
Code:
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
Patched.
Quote Originally Posted by Alessandro10 View Post
Code:
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
Patched.
Dang it, what do I do to fix it?
If you want to do Hotkeys With Comands of Console, render in Present.
Quote Originally Posted by Alessandro10 View Post
If you want to do Hotkeys With Comands of Console, render in Present.
That means...?
Basically. you need a menu base
Ugh! Menu's aren't my thing. Also, if I need menu, how did xghost get his hacks to work? Or how did noob get his hacks to work?
Posts 17 of 7 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?