Raised This Month: $ Target: $400
 0% 

Disable default MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 06-13-2014 , 15:37   Disable default MOTD
Reply With Quote #1

I want to disable the team choosing MOTD and create a custom menu instead.
Is it legal? if so, how can I hook the MOTD and disable it?
Please help
Thanks.
RateX is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-13-2014 , 15:41   Re: Disable default MOTD
Reply With Quote #2

disabling is easy
register_clcmd("jointeam", "cmd_jointeam")
register_clcmd("chooseteam", "cmd_jointeam")
register_clcmd("joinclass", "cmd_joinclass")

public all return PLUGIN_HANDLED

then you can just create a menu and do whatever you want, but it won't get called when pressing M
also you can't make another motd, only a menu
and it's legal
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 06-13-2014 at 15:42. Reason: mistake
aron9forever is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 06-13-2014 , 16:35   Re: Disable default MOTD
Reply With Quote #3

Thanks, it works. However, the "Select team" MOTD is still there when you connect.
Also, I'm trying to set player's team to spectator upon connect. I try it on both client_putinserver and client_connect, but it failed.
Please help.
Thanks.
RateX is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-13-2014 , 16:56   Re: Disable default MOTD
Reply With Quote #4

Quote:
Originally Posted by RateX View Post
Thanks, it works. However, the "Select team" MOTD is still there when you connect.
Also, I'm trying to set player's team to spectator upon connect. I try it on both client_putinserver and client_connect, but it failed.
Please help.
Thanks.
well this is what I use: Exolent's team join management for the join part, it also blocks the motd so it's all you need

keep the commands blocked tho unless you want people to use team menu after they joined
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 06-13-2014 , 17:56   Re: Disable default MOTD
Reply With Quote #5

Thanks, I'll try.
Also, you should add this to complete your sig:
Quote:
Originally Posted by Black Rose View Post
And I think that is a pretty small map size.
LOL

Last edited by RateX; 06-13-2014 at 17:56.
RateX is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-13-2014 , 22:30   Re: Disable default MOTD
Reply With Quote #6

cvar: motdfile >= "" (Default: motdfile "motd.txt");
Or simply delete the content of the motd.txt file (NOT THE FILE!)

Worked to me, but in this hlds version this will crash the server (for me, a time ago) i not tested in actually days.

Test and post the results here to us

After do this, create a simple menu to show to your clients
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 06-13-2014 at 22:30.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-14-2014 , 05:40   Re: Disable default MOTD
Reply With Quote #7

Quote:
Originally Posted by ^SmileY View Post
cvar: motdfile >= "" (Default: motdfile "motd.txt");
Or simply delete the content of the motd.txt file (NOT THE FILE!)

Worked to me, but in this hlds version this will crash the server (for me, a time ago) i not tested in actually days.

Test and post the results here to us

After do this, create a simple menu to show to your clients
he's talking about team join motd, not server motd upon joining
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-14-2014 , 11:43   Re: Disable default MOTD
Reply With Quote #8

Quote:
Originally Posted by aron9forever View Post
he's talking about team join motd, not server motd upon joining
Soo is not a MOTD is a menu omg, search already made by someone
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 06-16-2014 , 15:42   Re: Disable default MOTD
Reply With Quote #9

PHP Code:
set_msg_block(892
in the plugin_init()
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-16-2014 , 16:26   Re: Disable default MOTD
Reply With Quote #10

Quote:
Originally Posted by OnePL View Post
PHP Code:
set_msg_block(892
in the plugin_init()
What is 89? Please don't hardcode message ids. Also 2 is the BLOCK_SET constant that should be used with set_msg_block.
__________________
In Flames we trust!
Nextra 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 21:15.


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