Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[ANY] Hostname - Display Map Name


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
About

I made this plugin because I usually access my favorite [L4D]/[L4D2] servers through the "openserverbrowser" console command and,
despite knowing the dev name of the vanilla campaigns (c*m*), some customs maps don't follow this name format for its chapters,
Also, the chapter name doesn't appear not even through the Steam Group servers list, or through the Friend List, only the Map name is displayed,
Making it hard to find in which chapter the map is currently running on.

Description

This plugin will add the map name to the hostname, based on a KeyValue file located at data folder.
It was made mainly for [L4D]/[L4D2] game but should also work with other games.

Example

My hostname is "Mart Server", and I added the name "Dead Center [1-5]" for the "c1m1" map at the KeyValue file.
When the plugin runs, it will turn my hostname into "Mart Server | Dead Center [1-5]"

Cvars

A configuration file named "hostname_mapdisplay.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

PHP Code:

// Enables/Disables the plugin. 0 = Plugin OFF, 1 = Plugin ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
hostname_mapdisplay_enabled "1"

// Display format. Default = "{hostname} | {mapname}"
// Available tags: {hostname},{mapname}
// -
// Default: "{hostname} | {mapname}"
hostname_mapdisplay_format "{hostname} | {mapname}"

// Hostname used by the {hostname} tag.
// -
// Default: "<your server name>"
hostname_mapdisplay_hostname "<your server name>"

// Enables/Disables the plugin when the map is not found in the KeyValue file located at data folder. 0 = OFF, 1 = ON (shows the map dev name).
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
hostname_mapdisplay_mapnotfound "0" 

Admin Commands

PHP Code:

sm_hostname_mapdisplay_reload  // Reloads the hostname based on a KeyValue file located at data folder.
sm_hostname_mapdisplay_print_cvars // Prints the plugin related cvars and their respective values to the console. (needs "z" flag). 

Change Log

Spoiler


Notes
  • This plugin isn't compatible with other plugins that may also change the hostname.
  • On the first run, the hostname_mapdisplay_hostname cvar will be filled with your current hostname.

Thank you!

Related Plugins

Post Reply
  • Any feedbacks, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

Installation
  • Put the "hostname_mapdisplay.txt" file in your "\addons\sourcemod\data\" folder. [Note: this file is currently based on some of the L4D2 map names.]
  • Put the "hostname_mapdisplay.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.

Attached Files
File Type: txt hostname_mapdisplay.txt (16.3 KB)
File Type: sp Get Plugin or Get Source (hostname_mapdisplay.sp - 9.4 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

×
×
  • Dodaj nową pozycję...