Article Changing crosshair color — CS:GO

DREDD

Administrator
Administrator

DREDD

Administrator
Administrator
Status
Offline
Joined
Apr 18, 2019
Messages
191
Reaction score
323
5fbc8508e91a10f44409fecf1dffb357.png

How you can easily change the crosshair color (and outline color) without using any convars?

To do this you need to hook DrawSetColor from ISurface at index 15, then you check if the crosshair is being drawn and then you return your own color.

C++:
void __fastcall hk_drawsetcolor(ISurface* _this, void* edx, int r, int g, int b, int a)
{
    static const auto crosshair_color_return = utils::pattern_scan("client_panorama.dll", "FF 50 3C 80 7D 20 00") + 3;
    if (_ReturnAddress() == (void*)crosshair_color_return)
        return original(_this, 66, 134, 244, 255); // use the color you want here
 
    // you can also change the crosshair outline color if that's something you want
    static const auto crosshair_outline_color_return = utils::pattern_scan("client_panorama.dll", "FF 50 3C F3 0F 10 4D ? 66 0F 6E C6") + 3;
    if (_ReturnAddress() == (void*)crosshair_outline_color_return)
        return original(_this, 255, 255, 255, 255); // use the outline color you want here
 
    original(_this, r, g, b, a);
}
 
Top