本脚本只在L4D1下成功测试
#include <sourcemod>
#define ZB_VERTION "1.0.0.0"
public Plugin:myinfo =
{
name = "服务器中文名称",
author = "作者:maxjo.汉化:紫冰",
description = "服务器可以以中文命名",
version = ZB_VERTION,
url = "http://blog.youkuaiyun.com/zbzibing"
}
public OnPluginStart()
{
RegAdminCmd("sm_zbcn", Command_Namehost, ADMFLAG_RCON,"激活服务器中文名称")
}
public Action:Command_Namehost(client, args)
{
ServerCommand("hostname \"【紫冰支持】中文服务器\"")
}
转为UTF-8编码并保存为扩展名SP格式
激活插件命令server.cfg中添加sm_zbcn