Here is my code but nothing seems to work... I got the address from the sticky in this section.
Code:
#include <Windows.h>
bool a[15];
void __cdecl PushToConsole( const char* De_Man_Out )
{
DWORD *Client = ( DWORD* )(0x485DD0);
void* LazyMan = ( void* )*( DWORD* )( *Client + 0x208 );
__asm
{
push De_Man_Out;
call LazyMan;
add esp, 4;
}
}
typedef bool (*IsConnected_t)(void);
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void Hotkeys()
{
while (1)
{
if (GetAsyncKeyState(VK_NUMPAD0)&1)
a[1] = !a[1];
if (GetAsyncKeyState(VK_NUMPAD1)&1)
a[2] = !a[2];
if (GetAsyncKeyState(VK_NUMPAD2)&1)
a[3] = a[3];
if (GetAsyncKeyState(VK_NUMPAD3)&1)
a[4] =! a[4];
if (GetAsyncKeyState(VK_NUMPAD4)&1)
a[5] =! a[5];
if (GetAsyncKeyState(VK_NUMPAD5)&1)
a[6] =! a[6];
if (GetAsyncKeyState(VK_NUMPAD6)&1)
a[7] =! a[7];
if (GetAsyncKeyState(VK_NUMPAD7)&1)
a[8] =! a[8];
if (GetAsyncKeyState(VK_NUMPAD8)&1)
a[9] =! a[9];
if (GetAsyncKeyState(VK_NUMPAD9)&1)
a[10] =! a[10];
if (GetAsyncKeyState(VK_ADD)&1)
a[11] =! a[11];
}
}
void Hacks()
{
CreateThread(0,0,(LPTHREAD_START_ROUTINE)Hotkeys,0,0,0);
for each (bool i in a)
{
i = false;
}
while (true)
{
if (*(int*)0x3782D019)
{
if (a[1])
PushToConsole("SkelModelStencil 1" );
if (a[2])
PushToConsole("ModelDebug_DrawBoxes 1" );
if (a[3])
PushToConsole("ModelDebug_DrawSkeleton 1" );
if (a[4])
PushToConsole("ReloadSpeed 0.000000" );
if (a[5])
PushToConsole("ShowFirePath 1" );
if(a[6])
PushToConsole("DisableCrosshair 0" );
if (a[7])
PushToConsole("WireFrame 1" );
if (a[8])
PushToConsole("WireframeModels 1" );
if (a[9])
PushToConsole("FullBright 1" );
if (a[10])
PushToConsole("ShowFps 1");
if (a[11])
PushToConsole("FireSpeed 999.999999" );
Sleep(250);
}
}
}
void Hackstart()
{
while(!IsGameReadyForHook())
Sleep(100);
Hacks();
}
BOOL WINAPI DllMain(HMODULE hMod, DWORD dwReason, LPVOID lpReserved)
{
DisableThreadLibraryCalls(hMod);
if (dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0,0,(LPTHREAD_START_ROUTINE)Hackstart,0,0,0);
}
return TRUE;
}
EDIT: I FORGOT MY LOOP WITH THE HOTKEYS!