AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to increase the number of letters allowed on a DHUD message? (https://forums.alliedmods.net/showthread.php?t=335545)

GlobalPlague 12-13-2021 03:13

How to increase the number of letters allowed on a DHUD message?
 
In the zombie_plague_advance.txt file in the “cstrike/addons/data/lang” folder from where the ZP mod takes data to display HUD messages properly, I changed this:

Code:

NOTICE_VIRUS_FREE = T-virus has been set loose…
To this:

Code:

*==================================================*T-Virus has been set loose...*==================================================*
In the server, the HUD message is only partially displayed, and there are missing symbols. What is marked in red is what is missing from the HUD, when the HUD is displayed:

Code:

*==================================================*^nT-Virus has been released...^n*==================================================*
This problem happened when I changed the HUD message to be DHUD, but the problem wasn’t there when the HUD message wasn’t changed to DHUD, despite the fact the number of symbols was the same. So, the problem happened after I introduced DHUD.

Also, the name of the mod isn't fully displayed. The following code shows the name of the mod at the beginning of every round, in green color in the chat:

Code:

        // Format mod name
        formatex(g_modname, charsmax(g_modname), "Zombie Plague Advance 1.6.1")

This is the default code... but I made a new name that is longer than "zombie plague advance 1.6.1", and the last several letters aren't displayed.

As far as I know, there is a function, in the ZPA’s source code, that is responsible for the allowed number of symbols on a (D)HUD, I need to increase the function’s number, because the bigger the number is, the more symbols are allowed. However, I don’t know where to find the function.

I had the same problem before, but I don't remember how to solve it. All i know is that there is a value i must increase in order for more letters to be allowed.

Here is the ZPA’s source code: https://pastebin.com/Z4jBJmFs

So, can someone help me by telling me the name of the function, so i can find it and modify it?

Thanks.

OciXCrom 12-13-2021 07:25

Re: How to increase the number of letters allowed on a DHUD message?
 
If there' no variable associated with the message you're sending, then you cannot change the size limit. This limit is built in the game's engine itself.

DHUD messages have a much shorter size limit. I think it's 128 as compared to 512 for HUD, but don't quote me on that.

About the mod name, check the size of the g_modname variable, but I'm pretty sure this also had a hardcoded limit - 16 or 32. Not sure on the exact number but you can easily check it.

GlobalPlague 12-14-2021 16:31

Re: How to increase the number of letters allowed on a DHUD message?
 
Quote:

Originally Posted by OciXCrom (Post 2765881)
If there' no variable associated with the message you're sending, then you cannot change the size limit. This limit is built in the game's engine itself.

DHUD messages have a much shorter size limit. I think it's 128 as compared to 512 for HUD, but don't quote me on that.

About the mod name, check the size of the g_modname variable, but I'm pretty sure this also had a hardcoded limit - 16 or 32. Not sure on the exact number but you can easily check it.

Thanks for explaining this to me. Thanks for reminding me about the existence of this g_modname variable.

I changed the value of g_modname from 32 to 64, and it worked.

I solved the problem with the DHUD messages by reducing the number of symbols, so now all symbols are displayed.

Thanks.


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

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