Raised This Month: $13 Target: $400
 3% 

Module: Orpheu (v2.6.3)


Post New Thread Reply   
 
Thread Tools Display Modes
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-15-2015 , 01:24   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1431

Quote:
Originally Posted by addicted2sex View Post
You can catch hud messages by catching game messages:

MESSAGE_BEGIN with msgtype SVC_TEMPENTITY (23)
WRITE_BYTE(TE_TEXTMESSAGE); // TE_TEXTMESSAGE - 29
...
WRITE_STRING(message)

Using register_message? I tried that but it didn't work. It seems the only way to hook it is through orpheu as you can read here:

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.
However I figured I'd try hooking UTIL_HudMessage first to see if that works. I'm trying to create a permanent hud by blocking any hud messages that attempt to replace or use that channel. I feel like that's a better approach than re-sending the hud message every 0.1 seconds to ensure it remains on the player's screen.

Last edited by PartialCloning; 12-15-2015 at 01:24.
PartialCloning is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-15-2015 , 04:14   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1432

Hooking 23 with register_event (more register_message for blocking) works, but you won't be able to hook message sent from others plugins.

This might help as well: http://www.amxmodx.org/api/amxmodx/CreateHudSyncObj
__________________
Arkshine is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-15-2015 , 06:06   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1433

Is it possible to hook/block the messages sent from other plugins through orpheu using UTIL_HudMessage? Or can it only be done through the method ot_207 mentions in the quote above?
PartialCloning is offline
insanedude
Member
Join Date: Mar 2009
Old 12-27-2015 , 06:26   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1434

Is a fix ever planned for the sockets issue?
insanedude is offline
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 12-27-2015 , 08:32   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1435

Quote:
Originally Posted by PartialCloning View Post
Is it possible to hook/block the messages sent from other plugins through orpheu using UTIL_HudMessage? Or can it only be done through the method ot_207 mentions in the quote above?
Maybe, the most ellegant way is to create a metamod plugin, which catches MessageBegin() to look for (msg) type==23 then catching the second WriteByte() which contains the HUD channel and change it to something else. This way you will prevent sending HUDs through that channel from ALL the metamod plugins (including AMXX itself) and the HUD messages wont be dropped. And before sending your messages make sure they wont be checked and resended through another channel as well.
__________________
Let 7he gr0ovE r3Lease y0ur m!nd
addicted2sex is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-27-2015 , 11:19   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1436

Doesn't the game constantly send messages to players (developer 1;cl_showmessages 1)? If we're hooking every messagebegin and doing our checks there, then we might as well use a repeating 0.1 task to get the permanent hud effect. It shouldnt be that less efficient, if at all.

Wouldn't you say the most elegant method is for amxx to have a hud message forward? As that only has to be called when it sends the message? While register_message can still be used to hook map/half-life mods hud messages.
PartialCloning is offline
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 12-27-2015 , 19:54   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1437

Quote:
Originally Posted by PartialCloning View Post
Doesn't the game constantly send messages to players (developer 1;cl_showmessages 1)? If we're hooking every messagebegin and doing our checks there, then we might as well use a repeating 0.1 task to get the permanent hud effect. It shouldnt be that less efficient, if at all.

Wouldn't you say the most elegant method is for amxx to have a hud message forward? As that only has to be called when it sends the message? While register_message can still be used to hook map/half-life mods hud messages.
I suppose you havent wrote metamod plugins ? AMXX, for example, is hooking MessageBegin() and the other message forwards (WriteByte, WriteChar, WriteShort, WriteLong, WriteAngle, WriteString, WriteCoord, WriteEntity and MessageEnd) if register_message/register_event exists. What about the AMXX timer functionality, which is using StartFrame() forward, that's called hundred times in a second with so many false if() statements and etc ?!

If you use only AMXX as a third-party metamod plugin you can compile it manually removing that channel from the "random" list, BUT if you use other plugins as well, which send HUD messages, implementing a hud message forward into AMXX will be useless (except if it hooks the game messages as well). As for the repeating 0.1 task - those are 10 more game messages send to a player = total of 320 more messages per second if the server is full. Do you still think that 0.1 task is that efficient rather than hooking MessageBegin() ?

So hooking MessageBegin is not that inefficient (again I am saying if you use other meta plugins except AMXX). If you use AMXX - a forward will be nice, yes, or compile it yourself manually to exclude that channel. But thats my point of view ...

And yes - the game is constantly sending game messages to the connected clients and those hooks are slowing the engine (having in mind that GoldSrc engine is single threaded) but that's the sad truth.
__________________
Let 7he gr0ovE r3Lease y0ur m!nd

Last edited by addicted2sex; 12-27-2015 at 20:11.
addicted2sex is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-27-2015 , 20:59   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1438

Yeah I haven't wrote/use any metamod plugins other than AMXX. But what you're saying makes a lot of sense. That's why I was trying to avoid using a task at all costs, it just seems like the most inefficient way possible. Then when I thought of how hooking messagebegin would be even more calls, I figured it might possibly be more inefficient or close enough but comparing an amxx plugin to a metamod plugin and something that sends information to something that only receives information and blocks or adjusts it isn't very smart of me.

Since AMXX already hooks messagebegin it would still make more sense to have an amx forward right? Or would it not make a big difference if another metamod plugin hooked it?

Last edited by PartialCloning; 12-28-2015 at 13:30. Reason: module -> metamod plugin.
PartialCloning is offline
teh ORiON
Member
Join Date: Sep 2011
Location: Denmark
Old 02-14-2016 , 20:01   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1439

Hi,

Having some issues with running the newest version of orpheu on my centos linux server. Im running it together with newest dev amxmodx and newest metamod. The module runs just fine and I can hook functions just fine as well. However when trying to use arguments in the hooked function, only -1 ever gets passed as the first argument instead of the entity index. My signatures and hooking of the functions etc. are solid and well tested.

With a similar setup locally on windows, everything works just fine.
__________________
CTFGasGrenade :: GasThePlace(void)
teh ORiON is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-14-2016 , 20:25   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1440

If you have SELinux, try to set to disable it or set to permissive to see if it helps.

I vaguely remember someone having a similar issue (maybe posted here?) but can't remember if we found a solution.
__________________
Arkshine 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 06:00.


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