View Single Post
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(); 
__________________
I highly recommend joining the SourceMod Discord Server for real time support.

Last edited by backwards; 09-16-2020 at 11:16.
backwards is offline