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

New custom HUD Messages (CS:GO)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 03-20-2017 , 06:26   New custom HUD Messages (CS:GO)
Reply With Quote #1

PHP Code:
stock void hud_message(int clientchar[] channelchar[] colorchar[] color2char[] effectchar[] fadeinchar[] fadeoutchar[] fxtimechar[] holdtimechar[] messagechar[] spawnflagschar[] xchar[] y)
{
    
int ent CreateEntityByName("game_text");
    
DispatchKeyValue(ent"channel"channel);
    
DispatchKeyValue(ent"color"color);
    
DispatchKeyValue(ent"color2"color2);
    
DispatchKeyValue(ent"effect"effect);
    
DispatchKeyValue(ent"fadein"fadein);
    
DispatchKeyValue(ent"fadeout"fadeout);
    
DispatchKeyValue(ent"fxtime"fxtime);         
    
DispatchKeyValue(ent"holdtime"holdtime);
    
DispatchKeyValue(ent"message"message);
    
DispatchKeyValue(ent"spawnflags"spawnflags); //1 = show for all players
    
DispatchKeyValue(ent"x"x);
    
DispatchKeyValue(ent"y"y);         
    
DispatchSpawn(ent);
    
SetVariantString("!activator");
    
AcceptEntityInput(ent"display"client);
    
DispatchKeyValue(ent"OnUser1""!self,Kill,,%s,-1"holdtime);
    
AcceptEntityInput(ent"FireUser1");

https://developer.valvesoftware.com/wiki/Game_text
__________________

Last edited by _GamerX; 04-24-2017 at 13:46.
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-20-2017 , 06:30   Re: New custom HUD Messages (CS:GO)
Reply With Quote #2

I think waiting for a new Sourcemod patch to add support is the best thing to do now.
TheDS1337 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-20-2017 , 07:29   Re: New custom HUD Messages (CS:GO)
Reply With Quote #3

The HudText/HudSynchronizer natives work in CS:GO now.
psychonic is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-20-2017 , 08:00   Re: New custom HUD Messages (CS:GO)
Reply With Quote #4

Quote:
Originally Posted by psychonic View Post
The HudText/HudSynchronizer natives work in CS:GO now.
This is truly amazing! Thanks for the addition

EDIT: This code doesnt seem to work :/
Code:
SetHudTextParams(0.05, 0.45, 5.0, 255, 0, 0, 200, 0, 0.25, 1.0, 1.0);
ShowSyncHudText(client, g_Hud, "TEST TEST TEST");
Tried the same thing with ShowHudText instead and it doesnt work.

Last edited by TheDS1337; 03-20-2017 at 18:31.
TheDS1337 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-20-2017 , 18:44   Re: New custom HUD Messages (CS:GO)
Reply With Quote #5

Quote:
Originally Posted by DeagLe.Studio View Post
This is truly amazing! Thanks for the addition

EDIT: This code doesnt seem to work :/
Code:
SetHudTextParams(0.05, 0.45, 5.0, 255, 0, 0, 200, 0, 0.25, 1.0, 1.0);
ShowSyncHudText(client, g_Hud, "TEST TEST TEST");
Tried the same thing with ShowHudText instead and it doesnt work.
Do you have the latest gamedata?
psychonic is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-20-2017 , 19:15   Re: New custom HUD Messages (CS:GO)
Reply With Quote #6

This is a misleading title, it's not new, just you couldn't use it before since the client files were not properly setup. Just like it was in CS:S, which was fixed in both games now.
Mitchell is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-21-2017 , 01:22   Re: New custom HUD Messages (CS:GO)
Reply With Quote #7

Quote:
Originally Posted by psychonic View Post
Do you have the latest gamedata?
Yes, and I tried using the build-6066 from the Dev Builds too.
TheDS1337 is offline
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-21-2017 , 02:16   Re: New custom HUD Messages (CS:GO)
Reply With Quote #8

It's my fault. It should be "game" instead of "engine": https://github.com/alliedmodders/sourcemod/pull/598
kossolax is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-21-2017 , 02:23   Re: New custom HUD Messages (CS:GO)
Reply With Quote #9

Quote:
Originally Posted by kossolax View Post
It's my fault. It should be "game" instead of "engine": https://github.com/alliedmodders/sourcemod/pull/598
Yeah, I was trying to change it to game but I couldnt because I guess sourcemod instantly change it back to "engine" after startup
TheDS1337 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-21-2017 , 07:33   Re: New custom HUD Messages (CS:GO)
Reply With Quote #10

Quote:
Originally Posted by kossolax View Post
It's my fault. It should be "game" instead of "engine": https://github.com/alliedmodders/sourcemod/pull/598
That wouldn't cause it not to work since CS:GO matches either of those. If the natives still don't work with the gamedata as-is, it could be an issue with our implementation.
psychonic 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 19:29.


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