Half-Life и Adrenaline Gamer форум
http://aghl.ru/forum/

HLSDK (client) - Hud message by server
http://aghl.ru/forum/viewtopic.php?f=20&t=2753
Страница 1 из 1

Автор:  Gennaro-HL [ 09 авг 2017, 13:47 ]
Заголовок сообщения:  HLSDK (client) - Hud message by server

Hi.
I have a question, what is this?
I do not paint the color hud of the character
They use the same method of painting the letters.

I convert the ASCII code to letters
Can the error be there in the conversion?

Код:
for (j = 0; j < m_parms.lineLength; j++)
      {
         m_parms.currentChar = wLine[j];
         int nextX = m_parms.x + gHUD.GetHudCharWidth(m_parms.currentChar);
         MessageScanNextChar();
         if (m_parms.x >= 0 && m_parms.y >= 0 && nextX <= ScreenWidth)
         {
            char m_szTest[1500];
            sprintf(m_szTest, "%c", m_parms.currentChar);
            //TextMessageDrawChar(m_parms.x, m_parms.y, m_parms.currentChar, m_parms.r, m_parms.g, m_parms.b);
            gHUD.DrawHudString(m_parms.x, m_parms.y, ScreenWidth, m_szTest, m_parms.r, m_parms.g, m_parms.b);
         }
         m_parms.x = nextX;
      }

 

Автор:  Lev [ 09 авг 2017, 15:36 ]
Заголовок сообщения:  Re: HLSDK (client) - Hud message by server

Not sure exactly what you are asking, but check MessageScanNextChar - it can change colors in m_parms.r/g/b.

Автор:  Gennaro-HL [ 09 авг 2017, 16:04 ]
Заголовок сообщения:  Re: HLSDK (client) - Hud message by server

I want to color the hud messages that are generated in the example server with amxmodx:

Код:
set_hudmessage(255, 0, 0, 0.93, 0.95, 0, 6.0, 12.0)
show_hudmessage(id, "^1G^2G")
//Or with hlsdk
UTIL_HudMessage

Thank you for your answer now i check

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/