Raised This Month: $32 Target: $400
 8% 

Hud text is now supported in csgo!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bulletford
Junior Member
Join Date: Apr 2015
Old 03-19-2017 , 12:24   Hud text is now supported in csgo!
Reply With Quote #1

Found here:
https://www.reddit.com/r/csmapmakers...fc&sh=0e748dfc

Tested it myself, it works if you use the game_text entity, sourcemod hudmessage natives are still blocked.

Last edited by Bulletford; 03-19-2017 at 12:29.
Bulletford is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 03-19-2017 , 13:01   Re: Hud text is now supported in csgo!
Reply With Quote #2

nice info!
I'm waiting
__________________


Max-Play.pl - the best polish servers
CamerDisco is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-19-2017 , 13:06   Re: Hud text is now supported in csgo!
Reply With Quote #3

Whoa, this is huge. Hallelujah!
__________________
sneaK is offline
Bulletford
Junior Member
Join Date: Apr 2015
Old 03-19-2017 , 13:19   Re: Hud text is now supported in csgo!
Reply With Quote #4

Anybody interested in testing can use this code:

Anything past .7 on the X axis seems to be cut off

Code:
#include <sourcemod>
#include <sdktools>

public void OnPluginStart()
{
    RegConsoleCmd("sm_hudmessage", testmessage);
}

public Action testmessage(int client, int args)
{
	char arg1[64];
	char arg2[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	GetCmdArg(2, arg2, sizeof(arg2));
	int ent = CreateEntityByName("game_text");
	DispatchKeyValue(ent, "channel", "1");
	DispatchKeyValue(ent, "color", "255 255 255");
	DispatchKeyValue(ent, "color2", "0 0 0");
	DispatchKeyValue(ent, "effect", "0");
	DispatchKeyValue(ent, "fadein", "1.5");
	DispatchKeyValue(ent, "fadeout", "0.5");
	DispatchKeyValue(ent, "fxtime", "0.25"); 		
	DispatchKeyValue(ent, "holdtime", "5.0");
	DispatchKeyValue(ent, "message", "this is a test message\nThis is a new line test");
	DispatchKeyValue(ent, "spawnflags", "0"); 	
	DispatchKeyValue(ent, "x", arg1);
	DispatchKeyValue(ent, "y", arg2); 		
	DispatchSpawn(ent);
	SetVariantString("!activator");
	AcceptEntityInput(ent,"display",client);
	return Plugin_Handled;
}
Bulletford is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 03-19-2017 , 14:04   Re: Hud text is now supported in csgo!
Reply With Quote #5

Finally! I will test it asap
__________________
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.

Franc1sco is offline
Send a message via MSN to Franc1sco
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-19-2017 , 14:37   Re: Hud text is now supported in csgo!
Reply With Quote #6

Some added information: https://developer.valvesoftware.com/wiki/Game_text

Has anyone been able to get the Text Channel (text size) to work?
__________________
sneaK is offline
Deathknife
Senior Member
Join Date: Aug 2014
Old 03-19-2017 , 15:09   Re: Hud text is now supported in csgo!
Reply With Quote #7

Seems to support up to 6 messages at once and channels can be any int.
__________________
Deathknife is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 03-19-2017 , 15:48   Re: Hud text is now supported in csgo!
Reply With Quote #8

Nice! This was surely an unexpected pleasure.
Maxximou5 is offline
Bulletford
Junior Member
Join Date: Apr 2015
Old 03-19-2017 , 16:27   Re: Hud text is now supported in csgo!
Reply With Quote #9

Seems like it cuts off the right side on widescreen resolutions
Bulletford is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 03-19-2017 , 16:58   Re: Hud text is now supported in csgo!
Reply With Quote #10

Yay!
__________________
Neuro Toxin 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 16:03.


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