
void __stdcall hkPlaySound( const char* pSample )
{
pPlaySound( pSample );
if( g_pEngine->IsInGame( ) || !strstr( pSample , "inposition02.wav"))return;
do
{
ShowWindow( hWnd , SW_RESTORE );
SetActiveWindow( hWnd );
Sleep( 1000 );
} while( GetForegroundWindow( ) != hWnd );
DWORD dwStyle = GetWindowLong( hWnd , GWL_STYLE );
SetCursorPos( g_pDrawManager->GetXPos( ) + ( ( g_pDrawManager->GetWidth( ) ) / 4.3 ) , g_pDrawManager->GetYPos( ) + ( ( g_pDrawManager->GetHeight( ) ) / 4.3 ) + ( dwStyle & WS_BORDER ? 23 : 0 ) );
SendMessage( hWnd , WM_LBUTTONDOWN , VK_LBUTTON , 0x1000000 );
Sleep( 29 );
SendMessage( hWnd , WM_LBUTTONUP , VK_LBUTTON , 0x1000000 );
Sleep( 29 );
SetCursorPos( g_pDrawManager->GetXPos( ) + ( ( g_pDrawManager->GetWidth( ) ) / 4.3 ) , g_pDrawManager->GetYPos( ) + ( ( g_pDrawManager->GetHeight( ) ) / 4.3 ) + ( dwStyle & WS_BORDER ? 23 : 0 ) + 2 );
}
while (true)
{
{
SetCursorPos(440, 170);
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
}
Sleep(1);
}