Installing SourceMod/zh

From AlliedModders Wiki
Revision as of 04:57, 26 August 2019 by MisakaSora (talk | contribs)
Jump to: navigation, search
Language: English  • 한국어 • русский • 中文

安装SourceMod非常简单,几乎不需要添加什么配置修改。

前提条件

一个图形界面的网页浏览器,下载Metamod和SourceMod压缩包。 一个可以把文件拷贝到你专用服务主机上的工具。

SourceMod需要1.9.0或更高的Metamod:Source(建议使用最新版本)。点我访问Metamod:Source主页。手动安装SourceMM的教程可以在找到。

SourceMod几乎可以运行在所有起源引擎的游戏/模组上。

Valve在SourceMod的不同版本间,有时会在游戏中有不兼容SourceMod的更新。当出现这种情况时,你可能需要安装Metamod和SourceMod的快照版本,可以在需要的版本页面进行查看自己是否需要。

上传/安装

本地服务器

本地安装SourceMod,仅需要把.zip (Windows)或.tar.gz (Linux)文件解压到游戏目录下,比如Counter-Strike(反恐精英)的cstrike目录下、Day of Defeat(胜利之日)的dod目录下等等。

远程服务器

远程安装SourceMod,首先在你本地电脑上解压.zip (Windows)或.tar.gz (Linux)压缩包,解压后你会看到addons文件夹。

先定位到你的游戏文件夹,比如Counter-Strike(反恐精英)的cstrike、Day of Defeat(胜利之日)的dod,在这个文件夹下,应该有一个addons文件夹(如果没有,很可能是你没有安装Metamod:Source),然后使用FTP这样的工具,从你本地的addons文件夹,把整个内容上传到远程的addons文件夹下。结束后你的远程addons文件夹下应该有sourcemod文件夹。

如果在这些步骤上有点问题,你需要去了解一下FTP和服务器管理。不过,你可以找服务器供应者寻求帮助,一些服务器供应者可能会有服务器的图形化管理界面。

另外,如果你直接把tar,gz文件拷贝到srcds所在的文件夹,在cstrike子目录直接执行下面代码: tar -xzf ../sourcemod-1.1.0.tar.gz

检查安装

你的文件夹布局应该是这样的:

  • [mod] - 你的游戏模组目录
    • addons
      • metamod - Metamod:Source
      • sourcemod - SourceMod

当SourceMod上传好/拷贝好后,配置好Metamod:Source,然后完全重启游戏服务器(只是程序,不是电脑重启)。如果是本地的,直接关闭程序然后重启就好。如果是远程服务器,你可能需要寻求服务器供应者的帮助。不过,由于大部分服务器供应者会自动重启服务器,所以通过rcon直接输入quit指令也是安全的。

首先,在你的服务器控制台(不是客户端控制台),输入:

meta list

如果插件安装成功,你会看到下面的输出内容:

] meta list
Listing 1 plugin:
    [01] SourceMod (1.1.0.2489) by AlliedModders LLC

你接下来就可以使用SourceMod的控制台指令了:

sm

一个例子:

] sm version
 SourceMod Version Information:
    SourceMod Version: 1.1.0.2489
    SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.1.0-svn)
    SourcePawn API: v1 = 4, v2 = 2
    Compiled on: Sep  5 2008 02:02:12
    http://www.sourcemod.net/


最后,假定你已经设置好管理员(如果没有,参照这个页面),你可以加入游戏后测试游戏菜单,只需要在客户端控制台输入:

sm_admin

你应该会看到一个有一些选项的菜单。

问题解决

如果安装失败了,你大致会看到下面四种症状中的一种。

Metamod reports NOFILE or FAILED

If "meta list" replies with something like this:

] meta list
Listing 1 plugin:
  [01] <NOFILE>

Most likely, either the files are not located in the correct place, or the file could not be loaded. For more information, use the following command (except use the correct list number):

meta info 1

Metamod lists no plugins

If "meta list" replies with something like this:

] meta list
Listing 0 plugins:

There are several causes of this error.

  1. The most common cause is that sourcemod.vdf can't be located in the addons/metamod folder. Verify that sourcemod.vdf is present in this folder.
  2. If sourcemod.vdf is present, make sure you are using the correct build of Sourcemod (zip = windows, tar.gz = linux).

Metamod says nothing

If "meta list" has no reply at all, Metamod:Source is not properly installed. This wiki page may provide you with clues on how to solve this problem.