Ich leech mal auch ein wenig code
[Credits]
combatarmshacks
[Hotkeys]
Numpad 0 - Boxes
Numpad 1 - Sat Chams
Numpad 2 - No fog
Numpad 3 - ShowFps
Code :
#include <windows.h>
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x377981F0 ); // CA-NA
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
bool IsGameReadyForHook()
{
if( GetModuleHandle( "d3d9.dll" ) != NULL
&& GetModuleHandle( "ClientFX.fxd" ) != NULL
&& GetModuleHandle( "CShell.dll" ) != NULL )
return true;
return false;
}
bool sat[2];
bool fog[2];
void main()
{
while (!IsGameReadyForHook()){
Sleep(1);
}
bool boxes = false;
bool showfps = false;
while(true){
if(GetAsyncKeyState(VK_NUMPAD0)<0){
if(boxes){
PushToConsole("ModelDebug_DrawBoxes 0");
boxes = false;
} else {
PushToConsole("ModelDebug_DrawBoxes 1");
boxes = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD1)&1) sat[0] = !sat[0];
if(sat[0] && !sat[1])
{
PushToConsole("SkelModelStencil 1");
} else if(sat[1]) {
PushToConsole("SkelModelStencil 0");
sat[1] = false;
}
if(GetAsyncKeyState(VK_NUMPAD2)&1) fog[0] = !fog[0];
if(fog[0] && !fog[1])
{
PushToConsole("FogEnable 0");
} else if(fog[1]) {
PushToConsole("FogEnable 1");
fog[1] = false;
}
if(GetAsyncKeyState(VK_NUMPAD3)<0){
if(showfps){
PushToConsole("ShowFps 0");
showfps = false;
} else {
PushToConsole("ShowFps 1");
showfps = true;
}
}
Sleep(200);
}
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0,NULL);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}