MOTD Removal

From Valve Developer Community
< De
Jump to navigation Jump to search
English (en)Deutsch (de)Русский (ru)Translate (Translate)
Info content.png
This page has not been fully translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)

Dies ist eine einfache Corentfernung, um das MOTD ("Message Of The Day") Panel nicht mehr bei jedem Laden einer Map einzublenden.

hl2mp_client.cpp

Suche im Serververzeichnis des Quellcodes nach der Datei hl2mp_client.cpp und öffne diese.

Suche nach const ConVar *hostname = cvar->FindVar( "hostname" ); und kommentiere den folgenden Codeblock aus oder lösche ihn:

const ConVar *hostname = cvar->FindVar( "hostname" );
const char *title = (hostname) ? hostname->GetString() : "MESSAGE OF THE DAY";

KeyValues *data = new KeyValues("data");
data->SetString( "title", title );		// info panel title
data->SetString( "type", "1" );			// show userdata from stringtable entry
data->SetString( "msg",	"motd" );		// use this stringtable entry

pPlayer->ShowViewPortPanel( PANEL_INFO, true, data );

data->deleteThis();

Die MOTD sollte nun nicht länger beim Laden einer Map auftauchen.