Member
|
12-24-2021
, 11:52
Re: Could anyone edit the hud
|
#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(msg, 191, message, 3); get_pcvar_string(kz_overtimehud_color, colors, 11) parse(colors, r, 3, g, 3, b, 4) set_hudmessage(str_to_num(r), str_to_num(g), str_to_num(b), -1.0, 0.90, 0, 0.0, 2.0, 0.0, 1.0, -1); ShowSyncHudMsg(id, g_hud_overtime, msg); }
stock kz_hud_center(id, const message[], {Float,Sql,Result,_}:...) { static msg[192]; vformat(msg, 191, message, 3); set_hudmessage(255, 255, 255, -1.0, 0.46, 0, _, 0.1, _, _, -1) ShowSyncHudMsg(id, g_hud_center, msg); }
stock kz_hud_over(id, const message[], {Float,Sql,Result,_}:...) { static msg[192], colors[12], r[4], g[4], b[4]; vformat(msg, 191, message, 3); get_pcvar_string(kz_overhud_color, colors, 11) parse(colors, r, 3, g, 3, b, 4) set_hudmessage(str_to_num(r), str_to_num(g), str_to_num(b), -1.0, 0.01, 0, 0.0, 2.0, 0.0, 1.0, -1); ShowSyncHudMsg(id, g_hud_over, msg); }
// This is for show time over the HP of the player. stock kz_reymon_statustext(id, target, const msg[], {Float,Sql,Result,_}:...) { new message[160] vformat(message, 159, msg, 4); if(id) { if( is_user_connected(id) && is_user_connected(target) ) kz_print_statustext(id, target, message); } else { for( new i = 1; i <= g_maxplayers; i++) if( is_user_connected(i) && is_user_connected(target) ) kz_print_statustext(i, target, message) } }
stock kz_print_statustext(id, target, const msg[]) { message_begin(MSG_ONE_UNRELIABLE, g_statustext, _, id); write_byte(0); write_string(msg); message_end(); message_begin(MSG_ONE_UNRELIABLE, g_statusvalue, _, id); write_byte(2); write_short(target); message_end(); }
Last edited by Magicher0ex; 12-24-2021 at 12:02.
|
|