Raised This Month: $51 Target: $400
 12% 

Disable MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XenTerSiO
SourceMod Donor
Join Date: Nov 2011
Location: Black Mesa
Old 04-19-2013 , 04:51   Disable MOTD
Reply With Quote #1

Is it possible to completely turn off the MOTD window on the server?
Game: Counter-Strike: Source
XenTerSiO is offline
NinjaSK
Senior Member
Join Date: Sep 2012
Old 04-19-2013 , 04:59   Re: Disable MOTD
Reply With Quote #2

I wonder what happens if you just delete motd.txt on your server

Last edited by NinjaSK; 04-19-2013 at 05:00.
NinjaSK is offline
XenTerSiO
SourceMod Donor
Join Date: Nov 2011
Location: Black Mesa
Old 04-19-2013 , 05:44   Re: Disable MOTD
Reply With Quote #3

Still displays the standard Windows
XenTerSiO is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-19-2013 , 05:49   Re: Disable MOTD
Reply With Quote #4

Quote:
Originally Posted by XenTerSiO View Post
Is it possible to completely turn off the MOTD window on the server?
Game: Counter-Strike: Source
This block motd window whenever server try send it to players.
*edit
to clarify, not show motd when player join to server and type motd in chat.
But if player type in they own console spec_help, then it shows up.
Spoiler
__________________
Do not Private Message @me

Last edited by Bacardi; 04-19-2013 at 05:50.
Bacardi is offline
XenTerSiO
SourceMod Donor
Join Date: Nov 2011
Location: Black Mesa
Old 04-19-2013 , 05:58   Re: Disable MOTD
Reply With Quote #5

Thank you very much, it works!
XenTerSiO is offline
BLITZR
New Member
Join Date: Jul 2013
Old 07-18-2013 , 07:33   Re: Disable MOTD
Reply With Quote #6

PHP Code:
public OnPluginStart()
{
    
HookUserMessage(GetUserMessageId("VGUIMenu"), VGUIMenutrue);
}
 
public 
Action:VGUIMenu(UserMsg:msg_idHandle:bf, const players[], playersNumbool:reliablebool:init)
{
    new 
String:buffer[5];
    
BfReadString(bfbuffersizeof(buffer));
    if(
StrEqual(buffer"info"))
    {
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;


Hi all.

Hopefully you guys don't mind me hijacking this thread

This plugin works like a charm Bacardi, thank you. However I was hoping someone could help me make this pop up the team select menu, ontop of blocking the motd as it does now.

Cheers.

ps. The game is Counter-strike: Source.

Last edited by BLITZR; 07-18-2013 at 07:36.
BLITZR is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-18-2013 , 10:48   Re: Disable MOTD
Reply With Quote #7

untested
__________________
Do not Private Message @me
Bacardi is offline
BLITZR
New Member
Join Date: Jul 2013
Old 07-18-2013 , 13:30   Re: Disable MOTD
Reply With Quote #8

Thank you Bacardi. That worked perfectly, much appreciated.
BLITZR is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-15-2014 , 18:59   Re: Disable MOTD
Reply With Quote #9

...csgo
*block motd when player enter on level
PHP Code:
#include <cstrike>

new Handle:g_hTimers[MAXPLAYERS+1];

public 
OnPluginStart()
{
    
//HookUserMessage(GetUserMessageId("VGUIMenu"), VGUIMenu, true);
    
HookEventEx("player_connect_full"player_activate);
    
AddCommandListener(joingame"joingame");
}

public 
Action:joingame(client, const String:command[], argc)
{
    
//PrintToServer("%s", command);
    
if(g_hTimers[client] != INVALID_HANDLE)
    {
        
KillTimer(g_hTimers[client]);
        
g_hTimers[client] = INVALID_HANDLE;
    }
}

public 
player_activate(Handle:event, const String:name[], bool:dontBroadcast)
{
    
//PrintToServer("player_activate = %s", name);
    
new client GetClientOfUserId(GetEventInt(event"userid"));
    
g_hTimers[client] = CreateTimer(0.1clearmotdclientTIMER_REPEAT);
}

public 
Action:clearmotd(Handle:timerany:client)
{
    
//PrintToServer("clearmotd %i", client);

    
if(client == || !IsClientInGame(client) || IsFakeClient(client))
    {
        
g_hTimers[client] = INVALID_HANDLE;
        return 
Plugin_Stop;
    }

    new 
Handle:pb StartMessageOne("VGUIMenu"client);
    
PbSetString(pb"name""info");
    
PbSetBool(pb"show"false);

    new 
Handle:subkey;

    
subkey PbAddMessage(pb"subkeys");
    
PbSetString(subkey"name""title");
    
PbSetString(subkey"str""");

    
subkey PbAddMessage(pb"subkeys");
    
PbSetString(subkey"name""type");
    
PbSetString(subkey"str""0");

    
subkey PbAddMessage(pb"subkeys");
    
PbSetString(subkey"name""msg");
    
PbSetString(subkey"str""");

    
subkey PbAddMessage(pb"subkeys");
    
PbSetString(subkey"name""cmd");
    
PbSetString(subkey"str""1");
    
EndMessage();

    return 
Plugin_Continue;

}

/*
public Action:VGUIMenu(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init)
{
    new String:buffer[5];

    if(GetUserMessageType() == UM_Protobuf) // CSGO
    {
        PbReadString(bf, "name", buffer, sizeof(buffer));
        if(StrEqual(buffer, "info") && reliable)
        {
            return Plugin_Handled;
        }
    }
    return Plugin_Continue;
}
*/ 

Last edited by Bacardi; 03-15-2014 at 19:00.
Bacardi is offline
Reply



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 12:14.


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