AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Dont show HUD (https://forums.alliedmods.net/showthread.php?t=303037)

ComedyShotsGamer 11-20-2017 05:27

Dont show HUD
 
PHP Code:

public PlayerInformation(id)
{
    if(
PlayerInformationB[id])
    {
        if(
is_user_alive(id))
        {
            new 
Health get_user_health(id);
            new 
Armor  get_user_armor(id);
            
            switch(
cs_get_user_team(id))
            {
                case 
CS_TEAM_T:
                {
                    
set_dhudmessage(255000.270.8706.01.0)
                    
show_dhudmessage(id"Class: Prisoner | Health: %i | Armor: %i | Dollars: %i"HealthArmorDollars[id]);
                }
                case 
CS_TEAM_CT:
                {
                    
set_dhudmessage(002180.270.8706.01.0)
                    
show_dhudmessage(id"Class: Guard | Health: %i | Armor: %i | Dollars: %i"HealthArmorDollars[id]);
                }
            }
        }
    }


How to disable the dhudmessage?

WhiteFang1319 11-20-2017 05:39

Re: Dont show HUD
 
PHP Code:

public PlayerInformation(id)
{
    if(
PlayerInformationB[id])
    {
        if(
is_user_alive(id))
        {
            new 
Health get_user_health(id);
            new 
Armor  get_user_armor(id);
            
            switch(
cs_get_user_team(id))
            {
                case 
CS_TEAM_T:
                {
                    
//set_dhudmessage(255, 0, 0, 0.27, 0.87, 0, 6.0, 1.0)
                    //show_dhudmessage(id, "Class: Prisoner | Health: %i | Armor: %i | Dollars: %i", Health, Armor, Dollars[id]);
                
}
                case 
CS_TEAM_CT:
                {
                    
//set_dhudmessage(0, 0, 218, 0.27, 0.87, 0, 6.0, 1.0)
                    //show_dhudmessage(id, "Class: Guard | Health: %i | Armor: %i | Dollars: %i", Health, Armor, Dollars[id]);
                
}
            }
        }
    }


Just don't execute the function if you don't want the info to show. Simple.

DjSoftero 11-20-2017 05:44

Re: Dont show HUD
 
PHP Code:

public PlayerInformation(id)
{
}
    
/*if(PlayerInformationB[id])
    {
        if(is_user_alive(id))
        {
            new Health = get_user_health(id);
            new Armor  = get_user_armor(id);
            
            switch(cs_get_user_team(id))
            {
                case CS_TEAM_T:
                {
                    set_dhudmessage(255, 0, 0, 0.27, 0.87, 0, 6.0, 1.0)
                    show_dhudmessage(id, "Class: Prisoner | Health: %i | Armor: %i | Dollars: %i", Health, Armor, Dollars[id]);
                }
                case CS_TEAM_CT:
                {
                    set_dhudmessage(0, 0, 218, 0.27, 0.87, 0, 6.0, 1.0)
                    show_dhudmessage(id, "Class: Guard | Health: %i | Armor: %i | Dollars: %i", Health, Armor, Dollars[id]);
                }
            }
        }
    }
}*/ 

even better. no computing power is used checking if statements

ComedyShotsGamer 11-20-2017 05:53

Re: Dont show HUD
 
I dont mean this.

OciXCrom 11-20-2017 07:36

Re: Dont show HUD
 
What else?! The message shows only if PlayerInformationB[id] is TRUE. If it's not - it doesn't show it.


All times are GMT -4. The time now is 21:22.

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