Resolved Dhud colors

Coding Help/Re-API Supported
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1755
Joined: 2 Years Ago
Location: Egypt
Has thanked: 30 times
Been thanked: 87 times
Age: 21
Contact:

Re: Dhud colors

#11

Post by Raheem » 6 Months Ago

Open ze_core.sma and find:
    1. // Score Message Task
    2. public Score_Message(TaskID)
    3. {
    4.     switch(get_pcvar_num(g_pCvarScoreMessageType))
    5.     {
    6.         case 0: // Disabled
    7.         {
    8.             return
    9.         }
    10.         case 1: // DHUD
    11.         {
    12.             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)
    13.             show_dhudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
    14.         }
    15.         case 2: // HUD
    16.         {
    17.             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)
    18.             show_hudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
    19.         }
    20.     }
    21. }
Replace it with:
    1. // Score Message Task
    2. public Score_Message(TaskID)
    3. {
    4.     switch(get_pcvar_num(g_pCvarScoreMessageType))
    5.     {
    6.         case 0: // Disabled
    7.         {
    8.             return
    9.         }
    10.         case 1: // DHUD
    11.         {
    12.             set_dhudmessage(0, 0, 255, 0.38, 0.01, 0, 0.0, 9.0)
    13.             show_dhudmessage(0, "Humans")
    14.            
    15.             set_dhudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 9.0)
    16.             show_dhudmessage(0, "vs")
    17.            
    18.             set_dhudmessage(255, 0, 0, 0.54, 0.01, 0, 0.0, 9.0)
    19.             show_dhudmessage(0, "Zombies")
    20.            
    21.             set_dhudmessage(255, 255, 255, -1.0, 0.045, 0, 0.0, 9.0)
    22.             show_dhudmessage(0, "%i --------- %i", g_iHumansScore, g_iZombiesScore)
    23.         }
    24.         case 2: // HUD
    25.         {
    26.             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)
    27.             show_hudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
    28.         }
    29.     }
    30. }
And then go to zombie_escape.cfg and edit the score info cvar, make it: ze_score_message_type 1
You don't know? Learn and you will know.

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 258
Joined: 6 Months Ago
Location: Des Moines/USA
Donation: 1x donated in total €10.00
Has thanked: 6 times
Been thanked: 19 times
Age: 33
Contact:

#12

Post by Mark » 6 Months Ago

This is what i did. I dont care about hud message.
  1. // Score Message Task
  2. public Score_Message(TaskID)
  3. {
  4.     set_dhudmessage(0, 0, 255, 0.40, 0.01, 0, 0.0, 9.0)
  5.     show_dhudmessage(0, "HumanS")
  6.    
  7.     set_dhudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 9.0)
  8.     show_dhudmessage(0, "[VS]%L", LANG_PLAYER, "SCORE_MESSAGE", g_iHumansScore, g_iZombiesScore)
  9.    
  10.     set_dhudmessage(255, 0, 0, 0.54, 0.01, 0, 0.0, 9.0)
  11.     show_dhudmessage(0, "ZombieS")
  12. }
then in serverfiles/cstrike/addons/amxmodx/data/lang
  1. SCORE_MESSAGE = ^n[%i] ----------- [%i]
Only uses 3 messages and works nice.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests