Загрузка...

Why does the cursor control macro not work in games (windows.h)?

Thread in C/C++ created by EZTEN10 Dec 11, 2022. (bumped Dec 11, 2022) 182 views

  1. EZTEN10
    EZTEN10 Topic starter Dec 11, 2022 15 Jan 24, 2021

    #include <iostream>
    #include <windows.h>
    #define argh 0x80


    int main()
    {
    // y = (-) Верх (+) Низ
    // x = (-) Лево (+) Право
    float SetpositionCursor_x = 0.0f;
    float SetpositionCursor_y = 0.0f;
    bool foo = true;
    POINT TakepositionCursor;
    std::cout << "Working" << std::endl;
    while (foo)
    {
    GetCursorPos(&TakepositionCursor);
    if ((GetKeyState('C') & argh) != 0)
    {
    SetpositionCursor_y += 0.1f;
    SetCursorPos(TakepositionCursor.x - (int)SetpositionCursor_x, TakepositionCursor.y + (int)SetpositionCursor_y);
    Sleep(3);
    std::cout << "Working MACROS" << std::endl;
    }
    else {
    SetpositionCursor_y = 0.0f;
    SetpositionCursor_x = 0.0f;
    system("cls");
    // std::cout << "Clear BUFFERS" << std::endl;
    }
    }

    }
     
  2. Uwuku
    Uwuku Dec 14, 2022 пишу кодик:pressF: 262 Oct 11, 2019
    Меня интересует зачем тебе булевая foo?
     
Top
Loading...