Raised This Month: $32 Target: $400
 8% 

Change default hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 11-01-2018 , 09:17   Change default hud
Reply With Quote #1

Hello,

Im looking for a way to change the default HUD which says Friend/Enemy: name | HP: 100%. Im not sure if its done thru module coding since Ive seen it on lots of servers.
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-01-2018 , 16:30   Re: Change default hud
Reply With Quote #2

DHUDmessage search
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-01-2018 at 16:30.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-01-2018 , 17:50   Re: Change default hud
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
DHUDmessage search
StatusValue event search*
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 11-01-2018 , 19:12   Re: Change default hud
Reply With Quote #4

I got the idea

PHP Code:
register_event("StatusText""status_display""b"
PHP Code:
public status_display(id)
{
    new 
pi_targetp_body
    
get_user_aiming(idpi_targetp_body9999); 

    if(
is_user_alive(pi_target) && get_pcvar_num(g_pcvar_toggle) == 1
    { 
        new 
sz_name[32], sz_message[64]; 
        
get_user_name(pi_targetsz_name31);
        
//new target = entity_get_int(id, EV_INT_iuser2);        

        
if( cs_get_user_team(pi_target) == cs_get_user_team(id) ) 
            
format(sz_message63"Friend: %s | HP: %i | LVL: %i"sz_nameget_user_health(pi_target), PlayerLevel[pi_target]) 
        else  
            
format(sz_message63"Enemy: %s | LVL: %i"sz_namePlayerLevel[pi_target]) 
        
        
message_begin(MSG_ONEget_user_msgid("StatusText"), {000}, id); 
        
write_byte(0); 
        
write_string(sz_message); 
        
message_end();

        
//set_hudmessage(200, 200, 200, 0.0, -1.0, 0, 3.2, 4.0, 0.3, 0.1, 1) // HUDMESSAGE_COLOR 
        //show_hudmessage(id, "%s", sz_message) 
    

    
    return 
PLUGIN_CONTINUE 

How do I make it teamcolor? Also it doesnt dissapear when you take off the aim from enemy/friend.
__________________

Last edited by SomewhereLost; 11-02-2018 at 02:01.
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-02-2018 , 10:00   Re: Change default hud
Reply With Quote #5

i would suggest you to use this include, its the easiest way of changing the default color if im not wrong: https://forums.alliedmods.net/showthread.php?t=168294
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 11-02-2018 , 11:33   Re: Change default hud
Reply With Quote #6

Unfortunately that include has some known bugs, including the players are renamed to "unnamed".
__________________

Last edited by SomewhereLost; 11-02-2018 at 11:34.
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
Reply



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 12:00.


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