MOTD Removal

From Valve Developer Community
< Ru
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)

Это простое удаление кода, чтобы убрать панель MOTD (Message Of The Day), которая показывается всегда, когда вы загружаетесь на карту.

hl2mp_client.cpp

В папке Server вашего исходного кода найдите и откройте файл hl2mp_client.cpp.

Найдите const ConVar *hostname = cvar->FindVar( "hostname" ); на линии 66 (или просто в поиске) и закомментируйте или удалите следующий блок кода:

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();

MOTD больше не должен появляться каждый раз, когда вы заходите на карту.