
Originally Posted by
merp.
post your code here, i'll try and help if i can

#include "Main.h"
#include "xor.h"
#include "xstrings.h"
void __cdecl RunConsoleCommand( const char* cCommand )
{
void* address = ( void* )0x00485D30; //Unwrapped Console Address
__asm
{
Push cCommand
call address
add esp, 0x4
}
}
bool IsInGame()
{
switch(*(int*)0x37863E24) //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() /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ )
{
RunConsoleCommand( "SkelModelStencil 1" ); //On
}else{
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;
}