CSGO Source Cheat Skeet.cc health bar source code

BossPaste

User
Mar 22, 2023
3
0
1679862411725.png
C++:
int y = box_y;
int h = box_h;

/* anyways, put ur checkbox/combobox from menu */
/* font for render hp number -> small fonts */
/* but u need brain to paste it */
/* unk1 i think this is calc bar pos */
if ( ... )
{
    int v89 = std::min( 100, get_health( ) );
    int unk1 = ( int )( ( h * v89 ) / 100 );
 
    int red = 0x50;
    int green = 0xFF;
    int blue = 0x50;
 
    /* estk nice hardcode */
    if ( v89 >= 25 )
    {
        if ( v89 <= 50 )
        {
            red = 0xD7;
            green = 0xC8;
            blue = 0x50;
        }
    }
    else
    {
        red = 0xFF;
        green = 0x32;
        blue = 0x50;
    }
 
    char unk2[ 10 ] = "";
    sprintf( unk2, "%iHP", v89 );
 
    auto text_size = get_text_size( small_pixes, unk2 );
 
    draw_rect( x - 5, y - 1, 4, h + 2, col_t( 80, 80, 80, 255 * 0.49f ) );
    draw_outlined_rect( x - 5, y - 1, 4, h + 2, col_t( 10, 10, 10, ( 255 * 0.5f ) ) );
    draw_rect( x - 4, y + unk1, 2, h - unk1, col_t( red, green, 0, 255 ) );
 
    /* draw hp number */
    /* and you need to use alpha dormant yourself instead of 255 use your brain lol */
    /* text_size_right this is text_size.m_right( m_right from rect_t structure */
    /* 0 -> font_left */
    if ( v89 < 100 )
        draw_string( small_fonts, x - text_size_right - 6, y - 1, col_t( 255, 255, 255, 255 - 55.f ), 0, unk2 );
}
 
Top