![]() |
Registered User Msgs
Hey all, I twas Brian on botmans forums. :)
In my various development related files and notes I came across this file with some info on all the reg user msgs for TFC. I am looking for same for DoD now but can't remember how I got this list. I think I may have ran some exe against the dll file but am not sure if thats right or what this program may have been called... Been searching high and low. Does anyone recognize this piece of info? Code:
|
Re: Registered User Msgs
weird, when you use fixedsys font when posting it shows things line up right but after submitting the post it whacks the formatting... :(
|
Re: Registered User Msgs
oh and something tells me PM led me to whatever allowed me to get this info... help me PM :)
|
Re: Registered User Msgs
Sure, go to where you have pfnRegUserMsg hooked...
int iMessage = REG_USER_MESSAGE( themessagename, thesize ); Write the message number, size and name to the server console/log and return iMessage. That worked for me a while ago in a metamod plugin but since its been a while you'll have to play around with that info. |
Re: Registered User Msgs
You should forget completely trying to reference network messages by their ID numbers only. Forget the ID numbers, they're not explicit, not readable, complicated etc etc.
Why don't you write a set of functions that would query for you a small database of message name/ID pairs each time you request a message ? Like metamod's GET_USER_MSG_NAME() and GET_USER_MSG_ID()... I already have written something like this. The basis is in pfnRegUserMsg() since it's where all messages are registered. First off, the message structure... Code:
// user message record structure definition Code:
int pfnRegUserMsg (const char *pszName, int iSize) Code:
int GetUserMsgId (const char *msg_name) Code:
MESSAGE_BEGIN (MSG_ONE_UNRELIABLE, GetUserMsgId ("TempEntity"), NULL, pClient); |
Re: Registered User Msgs
your code assumes that I know what user msgs exist in the mod, that is the problem I need a list of what those messages are so I can determine which to intercept and what to do with them.
In addition I want to send these messages at other times when I deem fit. In DoD the screen turns redish tint to simulate pain. I want to send that effect as a part of a "slap" admin command. But in order to do so need to know the name of that message. I'm aware of not wanting to use the number, I just need a list of all user msg names for reference... I'm nearly positive it was some exe file that I ran against the mod dll that produced my list above. But for the life of me can't remember the name of it. I realize I could write my own code to gather this but why reinvent the wheel. Perhaps I'll have to if noone remembers such an app. |
Re: Registered User Msgs
aha, someone from the hlcoders list reminded me DOH!
Its "meta game" to metamod :) I new it was something simple :) |
Re: Registered User Msgs
You wouldn't have been able to since user messages are registered by the engine at runtime ( Almost 100% positive ). You have to get that info while the messages are being registered by the game dll. Both mine and PM's examples showed you how in some way.
|
Re: Registered User Msgs
well, nothing prevents you from dumping the whole messages database in a text file or in the console once they've all been registered by pfnRegUserMsg... a couple printf's will do :)
Anyway Lazy's example shows a simple way to go too :) |
Re: Registered User Msgs
Thanks guys, the "meta game" command was all I was looking for :)
|
All times are GMT +2. The time now is 05:37. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.