View Single Post
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-24-2021 , 13:04   Re: Could anyone edit the hud
Reply With Quote #10

Try this. I think it would related to StatusValue
https://wiki.alliedmods.net/Half-lif...ts#StatusValue

PHP Code:
if(is_user_alive(iPlayer)) {
    if(
g_iCurrentMode == e_mMatch) {
        new 
szTime[24];
        
fnConvertTime(g_ePlayerInfo[iPlayer][e_plrSurviveTime], szTimecharsmax(szTime), false);
        new 
szString[64]
        
formatex(szStringcharsmax(szString), "Survive time: %s"szTime);
        
HudTextMessage(idszString);
    }
    continue;


stock HudTextMessage(idmessage[])
{
    if (!
is_user_connected(id)) return;

    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("StatusText"), _id);
    
write_byte(0);
    
write_string(message);
    
message_end();
    
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("StatusValue"), _id); 
    
write_byte(2); 
    
write_short(0); //Just try to set it 0 first
    
message_end();

__________________
My plugin:

Last edited by Celena Luna; 12-24-2021 at 13:04.
Celena Luna is offline