Raised This Month: $44 Target: $400
 11% 

Could anyone edit the hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Magicher0ex
Member
Join Date: Dec 2019
Old 12-24-2021 , 07:21   Could anyone edit the hud
Reply With Quote #1

Can anyone convert the hud into the status message just like bottom left one:

Right Here
PHP Code:
        if(is_user_alive(iPlayer)) {
            if(
g_iCurrentMode == e_mMatch) {
                new 
szTime[24];
                
fnConvertTime(g_ePlayerInfo[iPlayer][e_plrSurviveTime], szTimecharsmax(szTime), false);
                
set_hudmessage(.red 100, .green 100, .blue 100, .0.01, .0.20, .holdtime 1.0);
                
ShowSyncHudMsg(iPlayerg_MsgSync"Survive time: %s"szTime);
            }
            continue;
        } 
Magicher0ex is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Algeria
Old 12-24-2021 , 07:56   Re: Could anyone edit the hud
Reply With Quote #2

Quote:
Originally Posted by Magicher0ex View Post
Can anyone convert the hud into the status message just like bottom left one:

Right Here
PHP Code:
        if(is_user_alive(iPlayer)) {
            if(
g_iCurrentMode == e_mMatch) {
                new 
szTime[24];
                
fnConvertTime(g_ePlayerInfo[iPlayer][e_plrSurviveTime], szTimecharsmax(szTime), false);
                
set_hudmessage(.red 100, .green 100, .blue 100, .0.01, .0,81 .holdtime 1.0);
                
ShowSyncHudMsg(iPlayerg_MsgSync"Survive time: %s"szTime);
            }
            continue;
        } 
TRY

Quote:
set_hudmessage(.red = 100, .green = 100, .blue = 100, .x = 0.01, .y = 0,81 .holdtime = 1.0);
To >>>

set_hudmessage(.red = 100, .green = 100, .blue = 100, .x = 0.00, .y = 0,81 .holdtime = 1.0);
__________________
Thanks you
SHIFT0 is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Algeria
Old 12-24-2021 , 08:40   Re: Could anyone edit the hud
Reply With Quote #3

Quote:
Originally Posted by Magicher0ex View Post
Can anyone convert the hud into the status message just like bottom left one:

Right Here
PHP Code:
        if(is_user_alive(iPlayer)) {
            if(
g_iCurrentMode == e_mMatch) {
                new 
szTime[24];
                
fnConvertTime(g_ePlayerInfo[iPlayer][e_plrSurviveTime], szTimecharsmax(szTime), false);
                
set_hudmessage(.red 100, .green 100, .blue 100, .0.01, .0.20, .holdtime 1.0);
                
ShowSyncHudMsg(iPlayerg_MsgSync"Survive time: %s"szTime);
            }
            continue;
        } 
Impossible !
This position must be in the bottom left one
but maybe u touching in other HUD
__________________
Thanks you
SHIFT0 is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 12-24-2021 , 11:42   Re: Could anyone edit the hud
Reply With Quote #4

Okey guys, but i'm not talking about position. I mean the text, i don't want it to be hud or dhud, i said that i want text to be like bottom left (status text)
Magicher0ex is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-24-2021 , 11:53   Re: Could anyone edit the hud
Reply With Quote #5

Quote:
Originally Posted by Magicher0ex View Post
Can anyone convert the hud into the status message just like bottom left one:

Right Here
PHP Code:
        if(is_user_alive(iPlayer)) {
            if(
g_iCurrentMode == e_mMatch) {
                new 
szTime[24];
                
fnConvertTime(g_ePlayerInfo[iPlayer][e_plrSurviveTime], szTimecharsmax(szTime), false);
                
set_hudmessage(.red 100, .green 100, .blue 100, .0.01, .0.20, .holdtime 1.0);
                
ShowSyncHudMsg(iPlayerg_MsgSync"Survive time: %s"szTime);
            }
            continue;
        } 
Try this one out
I didn't online on PC so I can't test
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_beginMSG_ONEget_user_msgid("StatusText"), {0,0,0}, id)
    
write_byte(0)
    
write_string(message)
    
message_end()

Quote:
Originally Posted by SHIFT0 View Post
Impossible !
This position must be in the bottom left one
but maybe u touching in other HUD
Your experiment with AMXX is still really really low, so please for god sake, don't try to reply on when you don't even understand the request is.
You post like 10 post in this section for the past 1-2 months already and some simple one you can't even do yet.
__________________
My plugin:

Last edited by Celena Luna; 12-24-2021 at 11:55.
Celena Luna is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-24-2021 , 11:56   Re: Could anyone edit the hud
Reply With Quote #6

quick edited since I forget to put HudTextMessage(id, szString); in
__________________
My plugin:
Celena Luna is offline
Old 12-24-2021, 12:04
Magicher0ex
This message has been deleted by Magicher0ex.
Old 12-24-2021, 12:10
Magicher0ex
This message has been deleted by Magicher0ex.
Old 12-24-2021, 12:15
Magicher0ex
This message has been deleted by Magicher0ex.
Magicher0ex
Member
Join Date: Dec 2019
Old 12-24-2021 , 12: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 13:02.
Magicher0ex is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-24-2021 , 13:17   Re: Could anyone edit the hud
Reply With Quote #8

Quote:
Originally Posted by Magicher0ex View Post
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

In your game, Option => Advance... => Uncheck the Center player names
It will move it from center to that corner
__________________
My plugin:

Last edited by Celena Luna; 12-24-2021 at 13:18.
Celena Luna is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 12-24-2021 , 13:30   Re: Could anyone edit the hud
Reply With Quote #9

Quote:
Originally Posted by Celena Luna View Post
In your game, Option => Advance... => Uncheck the Center player names
It will move it from center to that corner
Yes it moves the message there but also it move the player's name
In the server i played before players were showed in the center, but timer was posed over the hp.
Most of the players are using center option. I just want message bottom


Last edited by Magicher0ex; 12-24-2021 at 13:34.
Magicher0ex is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-24-2021 , 14: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 14:04.
Celena Luna is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:55.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode