Показать сообщение отдельно

  #2  
Старый 15.04.2021, 21:40
legendabrn
Участник форума
Регистрация: 08.03.2019
Сообщений: 121
С нами: 3781678

Репутация: 113
По умолчанию

Код:





Код:
void getScreenResolution(int& horizontal, int& vertical)
    {
        RECT desktop;
        const HWND hDesktop = GetDesktopWindow();
        GetWindowRect(hDesktop, &desktop);
        horizontal = desktop.right;
        vertical = desktop.bottom;
    }
  
    void getCrossHairPos(int& crosshairPosX, int& crosshairPosY)
    {
        int iHeight, iWidth;
        getScreenResolution(iWidth, iHeight);
        float chOff1 = *(float*)0xB6EC10, chOff2 = *(float*)0xB6EC14;
        crosshairPosX = iWidth * chOff2;
        crosshairPosY = iHeight * chOff1;
    }

    void cameraset(float X, float Y) {

        CVector mypos;
        CVector enpos;
        CVector vector;
        int h, v;

        enpos.fX = X;
        enpos.fY = Y;

        getCrossHairPos(h, v);
        mypos.fX = h;
        mypos.fY = v;

        vector = mypos - enpos;
        float AngleX = atan2f(vector.fY, -vector.fX) - M_PI / 2;

        *(float*)0xB6F258 = -(AngleX - M_PI / 2);
    }


Код:





Код:
cameraset(500,500);
 
Ответить с цитированием