- Status
- Offline
- Joined
- Apr 18, 2019
- Messages
- 147
- Reaction score
- 249

— 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);
}