Raised This Month: $79 Target: $400
 19% 

[CSGO] New HTML Font supported hud element


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 08-24-2020 , 05:51   [CSGO] New HTML Font supported hud element
Reply With Quote #1

Hello, while searching for a new hud element to display text to clients in csgo I found this



It's supports HTML Font flags as well and is part of the round end cs panel. Here's a snippet on how it works.

PHP Code:
Event newevent_message CreateEvent("cs_win_panel_round");
newevent_message.SetString("funfact_token""message here");

for(
int z 1<= MaxClientsz++)
  if(
IsClientInGame(z) && !IsFakeClient(z))
    
newevent_message.FireToClient(z);
                                
newevent_message.Cancel(); 
Sadly it has drawbacks of not rendering for 1 second when you send the message. So if you want to constantly update the text like surf\bhop timer, it will be invisible or delayed. Thought I would share this with the community.

Edit:
since people are sending me private messages about this, the way to clear the text is to send a fake round_start event to all clients (this will clear blood decals and particle effects)

PHP Code:
Event newevent_round CreateEvent("round_start");

    for(
int z 1<= MaxClientsz++)
      if(
IsClientInGame(z) && !IsFakeClient(z))
        
newevent_round.FireToClient(z);

    
newevent_round.Cancel(); 

Last edited by backwards; 09-16-2020 at 11:16.
backwards is offline
Kubad
Senior Member
Join Date: Sep 2015
Old 08-24-2020 , 07:26   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #2

but you cant edit size but seems good
Kubad is offline
Russian85
Junior Member
Join Date: Aug 2017
Old 08-24-2020 , 10:53   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #3

Quote:
Originally Posted by backwards View Post
Hello, while searching for a new hud element to display text to clients in csgo I found this



It's supports HTML Font flags as well and is part of the round end cs panel. Here's a snippet on how it works.

PHP Code:
Event newevent_message CreateEvent("cs_win_panel_round");
newevent_message.SetString("funfact_token""message here");

for(
int z 1<= MaxClientsz++)
  if(
IsClientInGame(z) && !IsFakeClient(z))
    
newevent_message.FireToClient(z);
                                
event_fake.Cancel(); 
Sadly it has drawbacks of not rendering for 1 second when you send the message. So if you want to constantly update the text like surf\bhop timer, it will be invisible or delayed. Thought I would share this with the community.
Not new.

__________________
Steam: Someone | Discord: Something | GitHub: @SomethingFromSomewhere
GitLab: @SomethingFromSomewhere

My beauty:
Russian85 is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 08-24-2020 , 12:23   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #4

what public plugin is it in then? also if you want to get technical, i did find this almost 2 years ago, just didn't try html tags
backwards is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-24-2020 , 12:55   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #5

Quote:
Originally Posted by backwards View Post
Hello, while searching for a new hud element to display text to clients in csgo I found this



It's supports HTML Font flags as well and is part of the round end cs panel. Here's a snippet on how it works.

PHP Code:
Event newevent_message CreateEvent("cs_win_panel_round");
newevent_message.SetString("funfact_token""message here");

for(
int z 1<= MaxClientsz++)
  if(
IsClientInGame(z) && !IsFakeClient(z))
    
newevent_message.FireToClient(z);
                                
event_fake.Cancel(); 
Sadly it has drawbacks of not rendering for 1 second when you send the message. So if you want to constantly update the text like surf\bhop timer, it will be invisible or delayed. Thought I would share this with the community.
thanks for sharing this
any idea how to show pictures? like a few post above
and how to clear the message from screen?
__________________

Last edited by 8guawong; 08-24-2020 at 12:55.
8guawong is offline
digin
Member
Join Date: Nov 2019
Old 08-24-2020 , 13:11   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #6

Quote:
Originally Posted by 8guawong View Post
thanks for sharing this
any idea how to show pictures? like a few post above
and how to clear the message from screen?
it works for me
PHP Code:
newevent.SetString("funfact_token"" <img src='image_url'>"); 

Last edited by digin; 08-25-2020 at 07:18.
digin is offline
MAGNET12
Member
Join Date: Dec 2017
Old 08-24-2020 , 20:02   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #7

How did u manage to set up so many colors? new hud is limited to 128 characters only

as for clearing the message, simply send blank ("")
__________________

Last edited by MAGNET12; 08-24-2020 at 20:05.
MAGNET12 is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 08-24-2020 , 23:21   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #8

Quote:
Originally Posted by MAGNET12 View Post
How did u manage to set up so many colors? new hud is limited to 128 characters only

as for clearing the message, simply send blank ("")
It's much larger than 128, i've had like 10000 char buffer pushed to it without any issue. Just need to use new lines \n if the text gets too wide
backwards is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-25-2020 , 00:20   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #9

Quote:
Originally Posted by digin View Post
it works for me
PHP Code:
newevent.SetString("funfact_token"" <img src='image_url' width='500' height='600'>"); 
thx that's what i tried yesterday i'm not sure why it did not work for me yesterday but it's working now

Quote:
Originally Posted by MAGNET12 View Post
How did u manage to set up so many colors? new hud is limited to 128 characters only

as for clearing the message, simply send blank ("")
thx!
__________________
8guawong is offline
MAGNET12
Member
Join Date: Dec 2017
Old 08-25-2020 , 04:45   Re: [CSGO] New HTML Font supported hud element
Reply With Quote #10

Quote:
Originally Posted by backwards View Post
It's much larger than 128, i've had like 10000 char buffer pushed to it without any issue. Just need to use new lines \n if the text gets too wide
Strange...here's the most I could squeeze:

https://imgur.com/a/9pEsQ91

Also, did u manage to change the font size somehow? font size doesn't work for me
__________________

Last edited by MAGNET12; 08-25-2020 at 04:46.
MAGNET12 is offline
Reply


Thread Tools
Display Modes

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 10:51.


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