Difference between revisions of "Installing SourceMod/zh"

From AlliedModders Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
SourceMod几乎可以运行在所有起源引擎的游戏/模组上。
 
SourceMod几乎可以运行在所有起源引擎的游戏/模组上。
  
Valve在SourceMod的不同版本间,有时会在游戏中有不兼容SourceMod的更新。当出现这种情况时,你需要安装Metamod和SourceMoD的快照版本,你可以在[[Required Versions (SourceMod)|需要特殊版本]]页面进行查看自己是否需要。
+
Valve在SourceMod的不同版本间,有时会在游戏中有不兼容SourceMod的更新。当出现这种情况时,你可能需要安装Metamod和SourceMod的快照版本,可以在[[Required Versions (SourceMod)|需要的版本]]页面进行查看自己是否需要。
  
=Uploading/Installing=
+
=上传/安装=
==Local Server==
+
==本地服务器==
To install [http://www.sourcemod.net/downloads.php SourceMod] locally, simply extract the <tt>.zip</tt> (Windows) or <tt>.tar.gz</tt> (Linux) package to your mod folder (i.e. <tt>cstrike</tt> for Counter-Strike, <tt>dod</tt> for Day of Defeat, et cetera).
+
本地安装[http://www.sourcemod.net/downloads.php SourceMod],仅需要把<tt>.zip</tt> (Windows)<tt>.tar.gz</tt> (Linux)文件解压到游戏目录下,比如Counter-Strike(反恐精英)的<tt>cstrike</tt>目录下、Day of Defeat(胜利之日)的<tt>dod</tt>目录下等等。
  
==Remote Server==
+
==远程服务器==
To install SourceMod remotely, first extract the <tt>.zip</tt> (Windows) or <tt>.tar.gz</tt> (Linux) package to your local computer (for example, your Desktop).  You will see an <tt>addons</tt> folder. 
+
远程安装SourceMod,首先在你本地电脑上解压<tt>.zip</tt> (Windows)<tt>.tar.gz</tt> (Linux)压缩包,解压后你会看到<tt>addons</tt>文件夹。
  
Using a tool such as [https://encrypted.google.com/#q=FTP FTP], locate your mod folder (i.e. <tt>cstrike</tt> for Counter-Strike:Source, <tt>dod</tt> for Day of Defeat:Source, et cetera).  Underneath this folder, you should have an <tt>addons</tt> folder (if not, Metamod:Source is probably not installed). From your local <tt>addons</tt> folder, upload the entire contents to your remote <tt>addons</tt> folder.  When done, your remote <tt>addons</tt> folder should have a <tt>sourcemod</tt> folder.
+
先定位到你的游戏文件夹,比如Counter-Strike(反恐精英)的<tt>cstrike</tt>、Day of Defeat(胜利之日)<tt>dod</tt>,在这个文件夹下,应该有一个addons文件夹(如果没有,很可能是你没有安装Metamod:Source),然后使用[https://encrypted.google.com/#q=FTP FTP]这样的工具,从你本地的<tt>addons</tt>文件夹,把整个内容上传到远程的<tt>addons</tt>文件夹下。结束后你的远程<tt>addons</tt>文件夹下应该有<tt>sourcemod</tt>文件夹。
  
If you have trouble with these steps, you need to get acquainted with FTP and server management.  However, you can also ask your server provider for help.  Some providers also have web interfaces for managing your server.
+
如果在这些步骤上有点问题,你需要去了解一下FTP和服务器管理。不过,你可以找服务器供应者寻求帮助,一些服务器供应者可能会有服务器的图形化管理界面。
  
Alternatively, if you copied the tar.gz to your srcds directory, execute the following from the cstrike sub directory:
+
另外,如果你直接把tar,gz文件拷贝到srcds所在的文件夹,在cstrike子目录直接执行下面代码:
 
tar -xzf ../sourcemod-1.1.0.tar.gz
 
tar -xzf ../sourcemod-1.1.0.tar.gz
  
=Checking the Install=
+
=检查安装=
Your folder layout should look like:
+
你的文件夹布局应该是这样的:
*<tt>[mod]</tt> - Your mod's folder
+
*<tt>[mod]</tt> - 你的游戏模组目录
 
**<tt>addons</tt>
 
**<tt>addons</tt>
 
***<tt>metamod</tt> - Metamod:Source
 
***<tt>metamod</tt> - Metamod:Source
 
***<tt>sourcemod</tt> - SourceMod
 
***<tt>sourcemod</tt> - SourceMod
  
Once SourceMod is uploaded/copied and configured with Metamod:Source, restart your server completely.  If it is local, shut it down and restart it.  If it is remote, you may need to ask your server provider for help.  However, it is often safe to issue a "quit" command via [[rcon]], since most providers will automatically restart your server.
+
当SourceMod上传好/拷贝好后,配置好Metamod:Source,然后完全重启游戏服务器(只是程序,不是电脑重启)。如果是本地的,直接关闭程序然后重启就好。如果是远程服务器,你可能需要寻求服务器供应者的帮助。不过,由于大部分服务器供应者会自动重启服务器,所以通过[[rcon]]直接输入quit指令也是安全的。
  
First, in your [[server console]] (not client console), type:
+
首先,在你的[[服务器控制台]](不是客户端控制台),输入:
 
<pre>meta list</pre>
 
<pre>meta list</pre>
  
If the install worked, you will see something like:
+
如果插件安装成功,你会看到下面的输出内容:
 
<pre>] meta list
 
<pre>] meta list
 
Listing 1 plugin:
 
Listing 1 plugin:
 
     [01] SourceMod (1.1.0.2489) by AlliedModders LLC</pre>
 
     [01] SourceMod (1.1.0.2489) by AlliedModders LLC</pre>
  
You should then be able to use the SourceMod root console command, which can be invoked with simply:
+
你接下来就可以使用SourceMod的控制台指令了:
 
<pre>sm</pre>
 
<pre>sm</pre>
  
For example:
+
一个例子:
 
<pre>] sm version
 
<pre>] sm version
 
  SourceMod Version Information:
 
  SourceMod Version Information:
Line 57: Line 57:
  
  
Lastly, assuming you have already setup your administration user (if not, see [[Adding Admins (SourceMod)|this page]]), you can test the in game menu by joining the server, and in the client console type the following:
+
最后,假定你已经设置好管理员(如果没有,参照[[Adding Admins (SourceMod)|这个页面]]),你可以加入游戏后测试游戏菜单,只需要在客户端控制台输入:
 
<pre>sm_admin</pre>
 
<pre>sm_admin</pre>
You should see a menu popup with all you options.
+
你应该会看到一个有一些选项的菜单。
  
=Troubleshooting=
+
=问题解决=
If the install failed, you will generally see one of four symptoms. 
+
如果安装失败,你可能是下面四种情况之一。
  
==Metamod reports NOFILE or FAILED==
+
==Metamod报错NOFILE或FAILED==
If "meta list" replies with something like this:
+
如果“meta list”指令的返回结果是这样的:
 
<pre>] meta list
 
<pre>] meta list
 
Listing 1 plugin:
 
Listing 1 plugin:
 
   [01] <NOFILE></pre>
 
   [01] <NOFILE></pre>
  
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):
+
大多数情况,这要么是文件定位错误,要么就是文件无法加载。想查看更多详情,使用下面的指令(不需要对正确的插件进行查询):
 
<pre>meta info 1</pre>
 
<pre>meta info 1</pre>
  
==Metamod lists no plugins==
+
==Metamod显示无插件==
If "meta list" replies with something like this:
+
如果“meta list”指令的返回结果是这样的:
 
<pre>] meta list
 
<pre>] meta list
 
Listing 0 plugins:</pre>
 
Listing 0 plugins:</pre>
  
There are several causes of this error.
+
有下面几种原因:
  
# 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.
+
# 最常见的原因是addons/metamod目录下找不到sourcemod.vdf文件,确保sourcemod.vdf在这个目录下。
# If sourcemod.vdf is present, make sure you are using the correct build of Sourcemod (zip = windows, tar.gz = linux).
+
# 如果sourcemod.vdf文件存在,确保使用了正确版本的Sourcemod(zip文件用于windows,tar.gz用于linux)
  
==Metamod says nothing==
+
==Metamod无返回==
If "meta list" has no reply at all, Metamod:Source is not properly installed. [[Installing Metamod:Source|This wiki page]] may provide you with clues on how to solve this problem.
+
如果“meta list”根本没有返回值,说明Metamod:Source没有正确安装。[[Installing Metamod:Source|这个页面]]可以教你如何解决这个问题。
  
  
 
[[Category:SourceMod Documentation]]
 
[[Category:SourceMod Documentation]]

Latest revision as of 04:52, 30 August 2019

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报错NOFILE或FAILED

如果“meta list”指令的返回结果是这样的:

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

大多数情况,这要么是文件定位错误,要么就是文件无法加载。想查看更多详情,使用下面的指令(不需要对正确的插件进行查询):

meta info 1

Metamod显示无插件

如果“meta list”指令的返回结果是这样的:

] meta list
Listing 0 plugins:

有下面几种原因:

  1. 最常见的原因是addons/metamod目录下找不到sourcemod.vdf文件,确保sourcemod.vdf在这个目录下。
  2. 如果sourcemod.vdf文件存在,确保使用了正确版本的Sourcemod(zip文件用于windows,tar.gz用于linux)

Metamod无返回

如果“meta list”根本没有返回值,说明Metamod:Source没有正确安装。这个页面可以教你如何解决这个问题。