recoil crosshair

reverseverse

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Jun 13, 2019
Messages
2
Reaction score
3
typical external
you can compare csgo window with GetActiveWindowTitle or csgo window handle with GetForegroundWindow since you need the csgo handle anyways if you want to play fullscreen windowed mode. if vpunch; vpunch.x is not valid you need to read this from game or just use some dumper (yes i know my english so trash). current value is x = 0x3038; y = 0x302C you can made it constant btw.

C++:
HWND gamewindow = FindWindow(NULL, "Valve001");
HDC ragedc = GetDC(HWND_DESKTOP);

int crosshairsize = 3;
int cx = 0;
int cy = 0;

bool xhair = true;
bool xhairrecoil = true;

while (true)
{
    if(xhair)
    {
        if(xhairrecoil)
        {
            cx = GetSystemMetrics(SM_CXSCREEN) / 2 - (crosshairsize - 1) / 2 - 5 *  (vPunchy * 2);
            cy = GetSystemMetrics(SM_CYSCREEN) / 2 - (crosshairsize - 1) / 2 + 5 * (vPunchx * 2);
        }
        else
        {
            cx = GetSystemMetrics(SM_CXSCREEN) / 2 - ((crosshairsize - 1) / 2);
            cy = GetSystemMetrics(SM_CYSCREEN) / 2 - ((crosshairsize - 1) / 2);
        }
        for (int i = 0; i < crosshairsize; i++)
        {
            SetPixel(ragedc, cx + i, cy + ((crosshairsize - 1) / 2), RGB(0, 255, 94));
            SetPixel(ragedc, cx + ((crosshairsize - 1) / 2), cy + i, RGB(0, 255, 94));
        }
    }
    Sleep(5);
}
by skips from mpgh. enjoy
 
Last edited:

PostmanTapOwO

very cool
User
very cool
User
Status
Offline
Joined
Jun 14, 2019
Messages
19
Reaction score
5
C++:
static auto rc_cross = g_CVar->FindVar("cl_crosshair_recoil");
      if (idk.misc_recoilcross)
          rc_cross->SetValue(1);
:)
 

otopoto

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Aug 8, 2019
Messages
6
Reaction score
0
Thanks, man! This was just what I was looking for :)
 
Top