AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Turning HUD into DHUD (https://forums.alliedmods.net/showthread.php?t=333952)

GlobalPlague 08-19-2021 20:18

Turning HUD into DHUD
 
Hello. Can someone help me to make the following HUD message to be shown as dhud, not just HUD. DHUD messages are shown in smaller print than HUD messages. I want the message to be shown in smaller print.

Here is the code:

Code:

Spectating someone else?
        if (id != ID_SHOWHUD)
        {
                // Show name, health, class, and ammo packs and armor
                set_hudmessage(255, 10, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1)
                ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L %s^nHP: %d - %L %s - %L %d - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id],
                pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id], ID_SHOWHUD, "ARMOR", pev(id, pev_armorvalue))
        }
        else
        {
                // Show health, class and ammo packs and armor
                set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
                ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L: %d - %L %s - %L %d - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS",
                class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD], ID_SHOWHUD, "ARMOR", pev(ID_SHOWHUD, pev_armorvalue))
        }
}

Thanks.

Celena Luna 08-19-2021 21:43

Re: Turning HUD into DHUD
 
you might be mistaken
DHud always bigger than Hud

GlobalPlague 08-19-2021 22:54

Re: Turning HUD into DHUD
 
Quote:

Originally Posted by Celena Luna (Post 2755664)
you might be mistaken
DHud always bigger than Hud

I thought DHUD is smaller than HUD.

In this case, i'm mistaken. I don't want bigger messages, but smaller ones. You know the default size of the HUD message that shows Health, Class, Ammo, etc... in ZPA 1.6.1, right? I want to make this message smaller.

iceeedr 08-19-2021 22:59

Re: Turning HUD into DHUD
 
Quote:

Originally Posted by GlobalPlague (Post 2755665)
I thought DHUD is smaller than HUD.

In this case, i'm mistaken. I don't want bigger messages, but smaller ones. You know the default size of the HUD message that shows Health, Class, Ammo, etc... in ZPA 1.6.1, right? I want to make this message smaller.

Not possible.

Natsheh 08-20-2021 01:08

Re: Turning HUD into DHUD
 
All you have to do is replace ShowSyncHudMsg

With show_hudmessage

zollymaN 08-21-2021 12:35

Re: Turning HUD into DHUD
 
Code:

Spectating someone else?
        if (id != ID_SHOWHUD)
        {
                // Show name, health, class, and ammo packs and armor
                set_hudmessage(255, 10, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1)
                ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L %s^nHP: %d - %L %s - %L %d - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id],
                pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id], ID_SHOWHUD, "ARMOR", pev(id, pev_armorvalue))
        }
        else
        {
                // Show health, class and ammo packs and armor
                set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
                ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L: %d - %L %s - %L %d - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS",
                class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD], ID_SHOWHUD, "ARMOR", pev(ID_SHOWHUD, pev_armorvalue))
        }
}

with

Code:

Spectating someone else?
        if (id != ID_SHOWHUD)
        {
                // Show name, health, class, and ammo packs and armor
                set_dhudmessage(255, 10, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1)
                show_dhudmessage(ID_SHOWHUD, "%L %s^nHP: %d - %L %s - %L %d - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id],
                pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id], ID_SHOWHUD, "ARMOR", pev(id, pev_armorvalue))
        }
        else
        {
                // Show health, class and ammo packs and armor
                set_dhudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
                show_dhudmessage(ID_SHOWHUD, "%L: %d - %L %s - %L %d - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS",
                class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD], ID_SHOWHUD, "ARMOR", pev(ID_SHOWHUD, pev_armorvalue))
        }
}



All times are GMT -4. The time now is 02:36.

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