View Single Post
Magicher0ex
Member
Join Date: Dec 2019
Old 12-24-2021 , 11:52   Re: Could anyone edit the hud
Reply With Quote #7

Yes but it's on the center. It seems to be over the hp, armor, round bar. So here is the whole example for statustext over hud bar i found. But i need your help
PHP Code:
// Print Default Players Msg over time round
// I use SyncHudMsg for dont flood the chat zone :D
// with stupid msg like "Checkpoint N 20" :P
stock kz_hud_overtime(id, const message[], {Float,Sql,Result,_}:...)
{
    static 
msg[192], colors[12], r[4], g[4], b[4];
    
vformat(msg191message3);
    
    
get_pcvar_string(kz_overtimehud_colorcolors11)
    
parse(colorsr3g3b4)
    
    
set_hudmessage(str_to_num(r), str_to_num(g), str_to_num(b), -1.00.9000.02.00.01.0, -1);
    
ShowSyncHudMsg(idg_hud_overtimemsg);
}

stock kz_hud_center(id, const message[], {Float,Sql,Result,_}:...)
{
    static 
msg[192];
    
vformat(msg191message3);
    
    
set_hudmessage(255255255, -1.00.460_0.1__, -1)
    
ShowSyncHudMsg(idg_hud_centermsg);
}

stock kz_hud_over(id, const message[], {Float,Sql,Result,_}:...)
{
    static 
msg[192], colors[12], r[4], g[4], b[4];
    
vformat(msg191message3);
    
    
get_pcvar_string(kz_overhud_colorcolors11)
    
parse(colorsr3g3b4)
    
    
set_hudmessage(str_to_num(r), str_to_num(g), str_to_num(b), -1.00.0100.02.00.01.0, -1);
    
ShowSyncHudMsg(idg_hud_overmsg);
}

// This is for show time over the HP of the player.
stock kz_reymon_statustext(idtarget, const msg[], {Float,Sql,Result,_}:...)
{
    new 
message[160]
    
vformat(message159msg4);
    
    if(
id)
    {
        if( 
is_user_connected(id) && is_user_connected(target) )
            
kz_print_statustext(idtargetmessage);
    } 
    else 
    {
        for( new 
1<= g_maxplayersi++)
            if( 
is_user_connected(i) && is_user_connected(target) )
                
kz_print_statustext(itargetmessage)
    }
}

stock kz_print_statustext(idtarget, const msg[])
{
    
message_begin(MSG_ONE_UNRELIABLEg_statustext_id);
    
write_byte(0);
    
write_string(msg);
    
message_end();
    
    
message_begin(MSG_ONE_UNRELIABLEg_statusvalue_id); 
    
write_byte(2); 
    
write_short(target); 
    
message_end();


Last edited by Magicher0ex; 12-24-2021 at 12:02.
Magicher0ex is offline