Raised This Month: $51 Target: $400
 12% 

Font size and color are broken in CSGO HintText and CenterText


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PerfectLaugh
Junior Member
Join Date: Oct 2014
Old 11-18-2019 , 19:25   Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #1


As the image shown.
PerfectLaugh is offline
694372459
Member
Join Date: Aug 2012
Old 11-18-2019 , 23:48   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #2

it seems that all html tag is broken
edited: <br> is work

Last edited by 694372459; 11-18-2019 at 23:50.
694372459 is offline
BulgarianPL
Member
Join Date: Dec 2013
Old 11-19-2019 , 06:08   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #3

Same problem...
Font color etc not working.

Is this a sourcemod issue or cs:Go removed it?
BulgarianPL is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 11-19-2019 , 08:43   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #4

This was discussed at length in the SM discord, but I'll write it out here for posterity.

The HTML feature in hint text was removed by CS:GO itself, this isn't a SourceMod issue. However, Valve still uses the HTML feature of center text in some places so they added this hardcoded whitelist in the code that enables HTML if the text being printed matches some strings:


By looking at that code carefully you'll find this specific check:
PHP Code:
StringAfterPrefix(str"#SFUI_Notice_NewWaveBegun_"
This check enables HTML if the center text starts with "#SFUI_Notice_NewWaveBegun_", so you can add that to the start of your printed text as a workaround to get your HUD working again (sort of):


This isn't a permanent solution. Valve will either fix the bug I mentioned above and we'll lose HTML for good, or they'll re-enable HTML in hint text again in a way that solves the initial issues that lead them to remove it.

Last edited by hmmmmm; 11-19-2019 at 08:44.
hmmmmm is offline
Proz
AlliedModders Donor
Join Date: Apr 2005
Old 11-19-2019 , 08:48   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #5

I believe csgo removed it, yes?
Proz is offline
Oylsister
Senior Member
Join Date: Aug 2019
Location: KhonKaen, Thailand
Old 11-19-2019 , 09:24   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #6

that sound stupid if they really gonna remove it.
Oylsister is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 11-19-2019 , 16:43   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #7

Hotfix https://forums.alliedmods.net/showth...90#post2673590


OFFTOPIC: And this is my messege number 4.000 here in alliedmods forums!
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 11-19-2019 at 16:45.
Franc1sco is offline
Send a message via MSN to Franc1sco
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-13-2020 , 12:10   Re: Font size and color are broken in CSGO HintText and CenterText
Reply With Quote #8


Quote:
Originally Posted by Franc1sco View Post
Does printhinttexts have prority in draw case? I found that FixHintColorMessages.sp hold by draw time printhinttexts for SFUI_ContractKillStart param
And how max char buffer for hit message? Because I found g_sSpace[2048] in your fix, tried for formatted PrintHintText and mod clipped it :\

PHP Code:
if(totalDmg) {
    
PrintHintText(ibuffer);
    
PrintToServer("Buffer length: %d [bytes: %d] for %N"strlen(buffer), GetCharBytes(buffer), i);
}

// Buffer length: 406 [bytes: 3] for Alex Deroza 
406*3 ~ 1218
So I don't fully understand why this buffer too low? :'|

Last edited by ZASTRELIS; 11-13-2020 at 14:34.
ZASTRELIS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:51.


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