public MCommandParameter{public: int m_Value; MCommandParameterInt( int nParam ) { ( ( void( __thiscall * )( void *, int ) )0x549D50 )( this, nParam ); }};class MCommandParameterVector_1 : public MCommandParameter{public: float X, Y, Z; MCommandParameterVector_1( float X, float Y, float Z ) { ( ( void( __thiscall * )( void *, float, float, float ) )0x497530 )( this, X, Y, Z ); }};class MCommandParameterVector_3 : public MCommandParameter{public: float X, Y, Z; MCommandParameterVector_3( float X, float Y, float Z ) { ( ( void( __thiscall * )( void *, float, float, float ) )0x4E8990 )( this, X, Y, Z ); }};class MCommandParameterUID : public MCommandParameter{public: MUID mValue; MCommandParameterUID( MUID *mParam ) { ( ( void( __thiscall * )( void *, MUID * ) )0x54A850 )( this, mParam ); }};class MCommandParameterBlob : public MCommandParameter{public: void *m_Value; MCommandParameterBlob( void *pParam, int nSize ) { ( ( void( __thiscall * )( void *, void *, int ) )0x54AA90 )( this, pParam, nSize ); }};void __declspec(naked) WINAPI ZPostCommand( MCommand *pCmd ){ __asm { mov ecx, dword ptr ss:[esp] mov eax, dword ptr ds:[esp+4] mov dword ptr ds:[esp+4], ecx mov dword ptr ss:[esp], eax push 0x402EBA mov eax, 0x501820 jmp eax }}MCommand *ZNewCmd( int iCmd ){ return ( ( MCommand*( * )( int ) )0x501590 )( iCmd );}struct ZPACKEDSHOTINFO{ float fShotTime; short posx; short poxy; short posz; short dirx; short diry; short dirz; int sel_type;};float fShotTime;void ZPostShot( float *Position, float *Direction, int iSel ){ MCommand *pCommand = ZNewCmd( 0x2732 ); ZPACKEDSHOTINFO ShotInfo = { fShotTime++, Position[0], Position[1], Position[2], Direction[0], Direction[1], Direction[2], iSel }; pCommand->AddParameter( new MCommandParameterBlob( &ShotInfo, 20 ) ); ZPostCommand( pCommand );}struct ZDashInfo{ float fShotTime; short posx; short poxy; short posz; short dirx; short diry; short dirz; char sel_type; short dash_unknown; char dash_unknown2;};void ZPostDash( float *vPos, float *vDir, char sel_type ){ MCommand *pCommand = ZNewCmd( 0x273D ); ZDashInfo DashInfo = { fShotTime++, vPos[0], vPos[1], vPos[2], vDir[0], vDir[1], vDir[2], sel_type, 0, 0 }; pCommand->AddParameter( new MCommandParameterBlob( &DashInfo, 20 ) ); ZPostCommand( pCommand );}void ZPostSpMotion( int SelType ){ MCommand *pCommand = ZNewCmd( 0x273E ); pCommand->AddParameter( new MCommandParameterInt( SelType ) ); ZPostCommand( pCommand );}void ZPostSpawn( MUID *uidPlayer, float *Position, float *Direction ){ MCommand *pCommand = ZNewCmd( 0x273A ); pCommand->AddParameter( new MCommandParameterUID( uidPlayer ) ); pCommand->AddParameter( new MCommandParameterVector_1( Position[0], Position[1], Position[2] ) ); pCommand->AddParameter( new MCommandParameterVector_3( Direction[0], Direction[1], Direction[2] ) ); ZPostCommand( pCommand );}__declspec(naked) void EnterCriticalSectionHook( ){ __asm { cmp dword ptr ss:[esp], 0x4CF39F jnz retorig cmp dword ptr ss:[ebp+4], 0x501613 jnz retorig mov eax, dword ptr ss:[ebp] cmp dword ptr ds:[eax+8], 0x238D jnz retorig mov esp, eax pop ebp add dword ptr ss:[esp], 9 ret 4 retorig: jmp g_dwEnterCriticalSection }}DWORD WINAPI HotKeyThread( LPVOID ){ while( 1 ) { if( GetAsyncKeyState( VK_MENU )&0x8000 ) { if( GetAsyncKeyState( 'L' )&0x8000 ) { g_bLawnmower = !g_bLawnmower; Beep( 500, 500 ); } else if( GetAsyncKeyState( 'X' )&0x8000 ) { g_bDashmower = !g_bDashmower; Beep( 500, 500 ); } else if( GetAsyncKeyState( 'E' )&0x8000 ) { g_bEgomower = !g_bEgomower; Beep( 500, 500 ); } else if( GetAsyncKeyState( 'D' )&0x8000 ) { g_bDantasticMode = !g_bDantasticMode; Beep( 500, 500 ); } else if( GetAsyncKeyState( 'B' )&0x8000 ) { g_bButterflyHack