Raised This Month: $ Target: $400
 0% 

Max holdtime in set_hudmessage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-12-2015 , 00:11   Max holdtime in set_hudmessage
Reply With Quote #1

Is there a maximum holdtime in the set_hudmessage? I would manually update it whenever I need to refresh it, I just need it to stay on otherwise.
PartialCloning is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-12-2015 , 00:22   Re: Max holdtime in set_hudmessage
Reply With Quote #2

HUD messages will be overwritten by other HUD messages if you try to show more HUD messages than there are channels (there are 4 HUD message channels).

There are threads that implement a (pseudo-)permanent HUD message. I'd recommend that you search for those topics.
__________________
fysiks is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-12-2015 , 00:41   Re: Max holdtime in set_hudmessage
Reply With Quote #3

So there is no holdtime limit? I feel sending data over and over when it doesn't need to be sent just for the sake of making sure it's not overwritten by another message isn't efficient. Especially when we're dealing with messages which from what I have read are the main cause of overflows when too many are sent at the same time or if one doesn't reach its target. There should be better ways to do it, even if it means editing other plugins and managing which plugins use the channels.
PartialCloning is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-12-2015 , 00:52   Re: Max holdtime in set_hudmessage
Reply With Quote #4

If there is a limit, it doesn't really matter because messages can easily be overwritten by other HUD messages. You can't do anything to manage this (realistically) since it's managed inside the game itself (and it's probably client-side).

Sending a message occasionally is unlikely to cause any issues and is likely irrelevant with regard to plugin efficiency (assuming you send it at a reasonable rate). Also, I highly doubt that they are the cause of overflows in most cases.
__________________

Last edited by fysiks; 12-12-2015 at 00:52.
fysiks is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-12-2015 , 03:42   Re: Max holdtime in set_hudmessage
Reply With Quote #5

"Occasionally" isn't good enough. It's either sending the message every second or it just won't look good ingame if it's overwritten by another message.

I tried hooking it through SVC_TEMPENTITY but it didn't work. Looking it up confirmed that it can't be hooked without orpheu

Quote:
Originally Posted by ot_207 View Post
Yes, connor is right.

You need to do the function format file for EngFunc_MessageBegin, EngFunc_MessageEnd, and EngFunc_WriteString. After that you basically hook the 3 functions with orpheu and do all the dirty work.
That leads us to:

1. Would anyone like to take a shot at this? Making the signatures if they are required as well as a sample plugin showing how you can use it to hook a hud message sent through a certain channel.
2. Arkshine if you read this, would a request for one of the channels to be set aside as a permanent hud channel be considered if I post it in the right section? Say if you use -1, the message wouldn't go through the channel assigned as the permanent hud channel.
PartialCloning is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-12-2015 , 13:16   Re: Max holdtime in set_hudmessage
Reply With Quote #6

And what if a plugin tries to print a HUD message on your arbitrary "permanent HUD" channel?
__________________
fysiks is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-12-2015 , 23:19   Re: Max holdtime in set_hudmessage
Reply With Quote #7

It's not the best solution but it sure is better than what we have now. If as a server admin you have more than one plugin with a permanent hud then you simply have to pick one or combine them. More often than not the plugins that require a permanent channel are gameplay changing plugins and thus you're not likely to have more than one anyway.

Perhaps what can be done is a check if there is a permanent channel assigned then use 3 channels for the plugins using -1. If not use all 4 channels? I'm just throwing ideas out there but it really is something that should be considered as just sending data over and over when you might only have to send it once every few minutes doesn't sound great.

The Orpheu plugin would be a better choice however as it gives you complete control over that channel, allowing you to know when other plugins use it and perhaps even blocking it or just overwriting it straight away.
PartialCloning 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 18:00.


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