How do you replace the default MOTD w/one displayed by a plugin?
As the title states...
I don't need code, was just wondering what the logic behind it is. I know how to display MOTDs and such. TY! Josh |
Re: How do you replace the default MOTD w/one displayed by a plugin?
The easiest way would probably be to just change the "motd" string in the InfoPanel string table.
I assume you want to change the client command that is sent also though. I've had a number of requests for changing the default MOTD and adding a "connect x.x.x.x:27016" client command for redirect. Someone has done it, but not released it publicly. I assume if this becomes a common usage that Valve will block it like they did the cl_restrict_server_commands cvar in an MOTD client command. I'm not sure how it was done. It's possible you could hook CCSPlayer::ShowViewPortPanel(char const*, bool, KeyValues*) and determine if it was the MOTD or not (if there is a "type" key set to TYPE_INDEX then it would be a MOTD window from either the game or a plugin). Another method might be to hook the engine's UserMessageBegin and MessageEnd and parse the bf_write for any ""VGUIMenu" messages to see if it is an MOTD or not, and if so if the stringtable it is showing is "motd" but this is a little more complicated. |
Re: How do you replace the default MOTD w/one displayed by a plugin?
Duke... lol
|
Re: How do you replace the default MOTD w/one displayed by a plugin?
Quote:
|
Re: How do you replace the default MOTD w/one displayed by a plugin?
so duke are you saying your cl_restrict_server program is not working?
i have found a redirector that is working at 72.91.27.75:28028 RN: Memorial Hospital and it appears to use your motd cl_restrict prograsm, but i cannot seem to get it to work |
Re: How do you replace the default MOTD w/one displayed by a plugin?
They probably used the same method, maybe even my source code, and changed the part that used to reset the cl_restrict cvar to a "connect x.x.x.x" command.
I wouldn't get too excited about being able to redirect in this fashion. Valve is aware that this is being done, and I would bet money that they will be blocking it in a future update. |
All times are GMT -4. The time now is 19:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.