AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Disable default MOTD (https://forums.alliedmods.net/showthread.php?t=242084)

RateX 06-13-2014 15:37

Disable default MOTD
 
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.

aron9forever 06-13-2014 15:41

Re: Disable default MOTD
 
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

RateX 06-13-2014 16:35

Re: Disable default MOTD
 
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.

aron9forever 06-13-2014 16:56

Re: Disable default MOTD
 
Quote:

Originally Posted by RateX (Post 2151242)
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

RateX 06-13-2014 17:56

Re: Disable default MOTD
 
Thanks, I'll try.
Also, you should add this to complete your sig:
Quote:

Originally Posted by Black Rose (Post 2151118)
And I think that is a pretty small map size.

LOL:D

^SmileY 06-13-2014 22:30

Re: Disable default MOTD
 
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

aron9forever 06-14-2014 05:40

Re: Disable default MOTD
 
Quote:

Originally Posted by ^SmileY (Post 2151348)
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

^SmileY 06-14-2014 11:43

Re: Disable default MOTD
 
Quote:

Originally Posted by aron9forever (Post 2151437)
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

OnePL 06-16-2014 15:42

Re: Disable default MOTD
 
PHP Code:

set_msg_block(892

in the plugin_init()

Nextra 06-16-2014 16:26

Re: Disable default MOTD
 
Quote:

Originally Posted by OnePL (Post 2152768)
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.


All times are GMT -4. The time now is 21:15.

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