Description:
A lot of server owners set their server name with their own language, but SRCDS console does not like direct UTF-8 characters.
I found 2 snippets of source code, one allows users to hard-encode their server name and the other allows users to write theirs in a file. However, this plugin have more general method: similar to Minecraft servers, allows Unicode code points in server name.
To use this plugin, what you need to do is CVar ssn_host_name. You need some tools to convert the characters that SRCDS console does not accept (Chinese, Japanese, Korean and so on) to code points. (For eample, the code points of "求生之路" (Chinese translation of "Left 4 Dead") are "\u6c42\u751f\u4e4b\u8def"), the plugin will convert the code points in that CVar to actual character.
By the way, you can add text "{id}" to CVar ssn_host_name, if you set up multiple servers on the same machine and their ports are continuous, with ssn_first_port, you can easily get incrementing server number.
Installation:
- Download set_server_name.smx below and put it in your servers /addons/sourcemod/plugins/.
- Start your server and edit cfg/sourcemod/set_server_name.cfg.
CVars:
PHP Code:
// 0 will disable the plugin, other number will enable it.
ssn_is_enabled "1"
// It affects {id} format item. {id} = 'ssn_first_id + hostport - ssn_first_port'.
ssn_first_port "27015"
// It affects {id} format item. {id} = 'ssn_first_id + hostport - ssn_first_port'.
ssn_first_id "1"
// Server name format string. {id} = Server number
ssn_host_name "Left 4 Dead 2 Server"