Dhud colors
Dhud colors
How is this done searched everywhere and most say it can't be done?
Examples if you know!
Thanks!
Examples if you know!
Thanks!
For DHUD: You can show only 8 messages at once.
We can do this by making 4 DHUD text messages:
We can do this by making 4 DHUD text messages:
- Humans - Blue
- vs - White
- Zombie - Red
- %i -- %i - White
He who fails to plan is planning to fail
You got a example how todo this?Raheem wrote: ↑5 years ago For DHUD: You can show only 8 messages at once.
We can do this by making 4 DHUD text messages:So 4 messages at once will not cause problems as our max is 8. This what i think how they did it.
- Humans - Blue
- vs - White
- Zombie - Red
- %i -- %i - White
OK, here is example:
- #include <amxmodx>
- public plugin_init()
- {
- register_plugin("Colored DHUD", "1.0", "Raheem")
- set_task(10.0, "ShowMessages", _, _, _, "b")
- }
- public ShowMessages()
- {
- set_dhudmessage(0, 0, 255, 0.38, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "Humans")
- set_dhudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "vs")
- set_dhudmessage(255, 0, 0, 0.54, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "Zombies")
- }
He who fails to plan is planning to fail
Ahh i get it!Raheem wrote: ↑5 years ago OK, here is example:Screenshot:
#include <amxmodx> public plugin_init() { register_plugin("Colored DHUD", "1.0", "Raheem") set_task(10.0, "ShowMessages", _, _, _, "b") } public ShowMessages() { set_dhudmessage(0, 0, 255, 0.38, 0.01, 0, 0.0, 9.0) show_dhudmessage(0, "Humans") set_dhudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 9.0) show_dhudmessage(0, "vs") set_dhudmessage(255, 0, 0, 0.54, 0.01, 0, 0.0, 9.0) show_dhudmessage(0, "Zombies") }Based on this idea you can achieve what you need.
- DHUD.png
Oh what about this ?
In zombie_escape.cfg set:
ze_score_message_type 0
He who fails to plan is planning to fail
and then i can see only Humans vs Zombies ?
where is the score ?
where is the score ?
No, he didn't ask for score add. Also i only give a example how this can be done.
You need a full working code with our Mod using this?
You need a full working code with our Mod using this?
He who fails to plan is planning to fail
Yes if possible.
Open ze_core.sma and find:
- // Score Message Task
- public Score_Message(TaskID)
- {
- switch(get_pcvar_num(g_pCvarScoreMessageType))
- {
- case 0: // Disabled
- {
- return
- }
- case 1: // DHUD
- {
- set_dhudmessage(get_pcvar_num(g_pCvarColors[Red]), get_pcvar_num(g_pCvarColors[Green]), get_pcvar_num(g_pCvarColors[Blue]), -1.0, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
- }
- case 2: // HUD
- {
- set_hudmessage(get_pcvar_num(g_pCvarColors[Red]), get_pcvar_num(g_pCvarColors[Green]), get_pcvar_num(g_pCvarColors[Blue]), -1.0, 0.01, 0, 0.0, 9.0)
- show_hudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
- }
- }
- }
- // Score Message Task
- public Score_Message(TaskID)
- {
- switch(get_pcvar_num(g_pCvarScoreMessageType))
- {
- case 0: // Disabled
- {
- return
- }
- case 1: // DHUD
- {
- set_dhudmessage(0, 0, 255, 0.38, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "Humans")
- set_dhudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "vs")
- set_dhudmessage(255, 0, 0, 0.54, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "Zombies")
- set_dhudmessage(255, 255, 255, -1.0, 0.045, 0, 0.0, 9.0)
- show_dhudmessage(0, "%i --------- %i", g_iHumansScore, g_iZombiesScore)
- }
- case 2: // HUD
- {
- set_hudmessage(get_pcvar_num(g_pCvarColors[Red]), get_pcvar_num(g_pCvarColors[Green]), get_pcvar_num(g_pCvarColors[Blue]), -1.0, 0.01, 0, 0.0, 9.0)
- show_hudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
- }
- }
- }
ze_score_message_type 1
He who fails to plan is planning to fail
This is what i did. I dont care about hud message.
then in serverfiles/cstrike/addons/amxmodx/data/lang
Only uses 3 messages and works nice.
- // Score Message Task
- public Score_Message(TaskID)
- {
- set_dhudmessage(0, 0, 255, 0.40, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "HumanS")
- set_dhudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "[VS]%L", LANG_PLAYER, "SCORE_MESSAGE", g_iHumansScore, g_iZombiesScore)
- set_dhudmessage(255, 0, 0, 0.54, 0.01, 0, 0.0, 9.0)
- show_dhudmessage(0, "ZombieS")
- }
- SCORE_MESSAGE = ^n[%i] ----------- [%i]
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: Bing [Bot] and 4 guests