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

[CS:GO] Custom HUD Elements


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NatalyaAF
Senior Member
Join Date: Dec 2008
Old 10-11-2015 , 21:06   [CS:GO] Custom HUD Elements
Reply With Quote #1

Valve made some huge updates to CS:GO on September 15. I was wondering if anyone knows about added HUD functionality. CS:GO has vote menus and hint texts (the thing with the ! on the left) but as far as I can figure it looks like it has no support for anything else, or any way to hack anything else onto the screen.

For example, CS:S used to have multicoloured text that could be rendered in the top left corner of the screen, or you could create a HUD element on the right middle of the screen.

Does anyone know of any way to get extra areas with text in CS:GO excluding the menu and hints? Or maybe a way to make the hints smaller and not have the big stupid ! in front of them?
__________________
Talk to me on Steam: natalyaaf
See my website for downloads: www.lady-natalya.info

Natalya: killing someone while they make a plugin
Natalya: perfect analogy
Natalya: for the mayan apocalypse
NatalyaAF is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 10-11-2015 , 22:31   Re: [CS:GO] Custom HUD Elements
Reply With Quote #2

I don't think this is possible with csgo, from what I know you can hook into the menus but nothing actually displays on them.
CowGod is offline
Send a message via Skype™ to CowGod
NatalyaAF
Senior Member
Join Date: Dec 2008
Old 10-13-2015 , 11:04   Re: [CS:GO] Custom HUD Elements
Reply With Quote #3

I tried doing some weird stuff with this once but it just ended up screwing with like the placement of the money and then it spammed weapon symbols in weird places. It's like there's something there but I can't get into it properly.

I was trying this sort of stuff:
Code:
new Handle:pb = StartMessageOne("HintText", client);
Code:
PbSetString(pb, "hints", tmptext);
__________________
Talk to me on Steam: natalyaaf
See my website for downloads: www.lady-natalya.info

Natalya: killing someone while they make a plugin
Natalya: perfect analogy
Natalya: for the mayan apocalypse
NatalyaAF is offline
TheWho
AlliedModders Donor
Join Date: Jul 2012
Old 10-13-2015 , 12:48   Re: [CS:GO] Custom HUD Elements
Reply With Quote #4

Perhaps they only use predefined strings like #Money or #Ak47
So there is no way to print text there.

We can be lucky that we have hints and alerts.

One thing I thought is, you could create a death event and change some players name after fireing you could change it back to his name.
When you think about doing this pls sent me a snippet
TheWho is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-13-2015 , 16:54   Re: [CS:GO] Custom HUD Elements
Reply With Quote #5

You can override the get translation function using dhooks
__________________
Neuro Toxin is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-14-2015 , 16:04   Re: [CS:GO] Custom HUD Elements
Reply With Quote #6

You can also attach sprites to a player's screen. Using the viewmodel and only transmitting it to that player.
Mitchell is offline
NatalyaAF
Senior Member
Join Date: Dec 2008
Old 11-10-2015 , 19:14   Re: [CS:GO] Custom HUD Elements
Reply With Quote #7

Quote:
Originally Posted by Neuro Toxin View Post
You can override the get translation function using dhooks
I don't understand; what would this let me do?
__________________
Talk to me on Steam: natalyaaf
See my website for downloads: www.lady-natalya.info

Natalya: killing someone while they make a plugin
Natalya: perfect analogy
Natalya: for the mayan apocalypse
NatalyaAF is offline
dilalmon
AlliedModders Donor
Join Date: Apr 2013
Old 11-10-2015 , 20:53   Re: [CS:GO] Custom HUD Elements
Reply With Quote #8

Quote:
Originally Posted by Mitchell View Post
You can also attach sprites to a player's screen. Using the viewmodel and only transmitting it to that player.
I've read you mentioning this before, but I never was able to do it myself.
Any sample code and screenshot of the result?
dilalmon is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-11-2015 , 13:43   Re: [CS:GO] Custom HUD Elements
Reply With Quote #9

Here's what i have, it was from 2013 however so i dont have any screen shots.
Code:
if(IsValidEntity(playerViewModel[client])) {
		new Prop = CreateEntityByName("prop_dynamic_override");
		if(Prop > 0 && IsValidEntity(Prop))
		{
			PrecacheModel("models/weapons/w_eq_flashbang_thrown.mdl");
			DispatchKeyValue(Prop, "model", "models/weapons/w_eq_flashbang_thrown.mdl");
			DispatchKeyValue(Prop, "disablereceiveshadows", "1");
			DispatchKeyValue(Prop, "disableshadows", "1");
			DispatchKeyValue(Prop, "solid", "0");
			DispatchSpawn(Prop);
			SetEntPropEnt(Prop, Prop_Send, "m_hOwnerEntity", client);
			SetVariantString("!activator");
			AcceptEntityInput(Prop, "SetParent", playerViewModel[client], Prop, 0);
			AcceptEntityInput(Prop, "DisableShadow");
			
			TeleportEntity(Prop, Float:{50.0, 37.0, 30.0}, Float:{270.0, 100.0, 0.0}, NULL_VECTOR);
			entBatt[client] = EntIndexToEntRef(Prop);
		}
	}

	new ent = -1;
	new Owner = -1;
	while((ent = FindEntityByClassname(ent, "predicted_viewmodel"))!=-1) {
		Owner = GetEntPropEnt(ent, Prop_Send, "m_hOwner");
		if ((Owner > 0) && (Owner <= MaxClients))
		{
			if (GetEntProp(ent, Prop_Send, "m_nViewModelIndex") == 0)
			{
				playerViewModel[Owner] = EntIndexToEntRef(ent);
			}
		}
	}

Last edited by Mitchell; 11-11-2015 at 13:48.
Mitchell 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 07:00.


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