What's wrong with this?

Posts 1–7 of 7 · Page 1 of 1
What's wrong with this?
Here i put this together, but it crashes immediately after loading...
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
&& GetModuleHandleA( "CShell.dll"   ) != NULL )
return true;
return false;
}
void PTC(const char* Command) {
DWORD CNADDIE = 0x007d9200;
void* Send = ( void* )*( DWORD* )(CNADDIE);
__asm
{
/* CREDITS TO CN */
push Command;
call Send; 
add esp, -4+2+6-1+1;
}
} 
void main()
{
while(true)
{
PTC("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;
}
And i packed it with UPX that didn't fix it anything else i should do?
PTC("SkelModelStencil 1");

next line, add
Sleep(100)

see if that fixes it. i dont think it will, but it will kill lag, which may be where ur problem lies.
Quote Originally Posted by BloodSkin View Post
PTC("SkelModelStencil 1");

next line, add
Sleep(100)

see if that fixes it. i dont think it will, but it will kill lag, which may be where ur problem lies.
HAHA that did it thanks dude! thanks/ +rep
One More question... if i add multiple PTC commands, should i just toss that at the end, or after each one?
Quote Originally Posted by fvestrgenrl View Post
HAHA that did it thanks dude! thanks/ +rep
One More question... if i add multiple PTC commands, should i just toss that at the end, or after each one?
Well, if your C+Ping code together to make an auto on hack, sure.

If your going to make a hotkey hack, make GetAsyncKeyState functions.
i know that, i'm just learning how a hack works before i code my own
Keep the sleep right before the closing brace of your while statement.
your hook is bad also...i think
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us