搜索
查看: 13697|回复: 30

AMX0.99官方手册中文译本

[复制链接]
发表于 2005-2-22 16:21:43 | 显示全部楼层 |阅读模式 来自 中国–江苏–苏州–张家港市
官方手册中文译本地址:
http://amx.dt-club.net
http://221.224.16.130/amx/



感谢点通提供amx.dt-club.net二级域名,本手册首先发表在点通论坛,您可以任意使用或转贴地址,但希望保留出处




关于AMX0.99应用的14个问题


第一:怎样安装AMX?
http://amx.dt-club.net/metamod.html
http://amx.dt-club.net/amxinstall.html

第二:如何创建AMX管理员或拥有特殊权限的用户?
http://amx.dt-club.net/amxusers.html

第三:怎样安装第三方插件?
http://amx.dt-club.net/amxplugins.html

第四:怎样编译第三方插件?
http://amx.dt-club.net/amxcompile.html

第五:怎样使用AMX的组件(modules)?
http://amx.dt-club.net/amxmodules.html

第六:怎样禁止武器,比如禁盾?
http://amx.dt-club.net/amxweaponrest.html

第七:怎样配置游戏状态,比如将排名复位?
http://amx.dt-club.net/amxstats.html

第八:AMX菜单语言调用问题?
http://amx.dt-club.net/amxlangconf.html

第九:怎样调用不同服务器CFG,比如将混战服务器改为比赛服务器?
http://amx.dt-club.net/amxcfgmenu.html

第十:怎样获得AMX更多命令帮助?
http://amx.dt-club.net/amxcommands.html

第十一:怎样通过AMX换图?
http://amx.dt-club.net/amxmapsmenu.html

第十二:怎样通过AMX改变服务器参数,比如开启互伤与改变冻结时间等?
http://amx.dt-club.net/amxcvarsmenu.html

第十三:AMX命令行菜单的问题?
http://amx.dt-club.net/amxcmdmenu.html
http://amx.dt-club.net/amxclcmdmenu.html
http://amx.dt-club.net/amxmenus.html

第十四:怎样使用AMX的MySQL来存储设置?
http://amx.dt-club.net/amxmysql.html
 楼主| 发表于 2005-2-22 16:25:49 | 显示全部楼层 来自 中国–江苏–苏州–张家港市
先把沙发抢了!下面的东西来自程序readme,尽快把它翻译出来

AMX Mod 0.9.9 -Linux版本-适用Steam
=============================================================================
   I.         安装
  II.         命令行
III.         编写插件
  IV.         编译插件
   V.         设置
  VI.         问题解决.FAQ
VII.         版本历史

您可以访问AMX官方面论坛获得进一步帮助信息

同时您还可以访问http://amx.dt-club.net


I.安装
=============================================================================
使用AMX,您*必须*已经安装了Metamod 1.17或者更高版本
"$moddir"变量是您的MOD地址,比如您运行Counter-Strike,它就是cstrike

1.从http://www.metamod.org下载MetaMod并根据它的提示安装它

注意:AMX这个安装包已经包含了MetaMod 1.17.1.
将$moddir/addons/metamod/sample_plugins.ini 文件名称改为plugins.ini.


   安装后,您应该得到这样的结构:
     $moddir/addons/metamod/dlls/metamod_i386.so
     $moddir/addons/metamod/plugins.ini

   在您的 $moddir/liblist.gam文件中:
     gamedll_linux "dlls/cs_i386.so"

   替换成:
     gamedll_linux "addons/metamod/dlls/metamod_i386.so"


2. 解开AMX到您的 $moddir 目录.
  您应该得到这样的结构:
     $moddir/addons/amx/dlls/amx_mm_i586.so
     $moddir/addons/amx/modules/fun_mm_i586.so
     $moddir/addons/amx/modules/csstats_mm_i586.so
     $moddir/addons/amx/modules/mysql_i586.so
     $moddir/addons/amx/examples/source/default/*.sma
     $moddir/addons/amx/examples/include/*.inc
     $moddir/addons/amx/logs/...
     $moddir/addons/amx/config/plugins.ini
     $moddir/addons/amx/config/modules.ini
     $moddir/addons/amx/plugins/*.amx
     $moddir/addons/amx/...


3. 打开 "addons/metamod/plugins.ini" 并确认里面包含了
   (符号;为注释符):
     ; AMX Mod
     linux addons/amx/dlls/amx_mm_i586.so

  您也可以加注您需要使用的组件.



4. 打开"addons/amx/modules.ini" 并添加以下行(如果他们不存在):
     ; More script functions for AMX Mod
     fun_mm_i586.so
     ; Counter-Strike Statistics (only if you use stats)
     csstats_mm_i586.so
     ; MySQL access (only if you run plugins to use with that)
     mysql_i586.so


5. 确认您的AMX插件在"addons/amx/plugins"目录下.

   他们需要加注到 addons/amx/config/plugins.ini.

   您可以添加参数到HLDS启动命令行.
   (比如添加 +localinfo amx_plugins "addons/amx/plugins.ini")


提示:
   . 您可以在modules.ini里不启用CS状态组件
   . MetaMod 一般调用"addons/metamod/plugins.ini" 或"metamod.ini" 文件,
     如果没有话,您可以创建一个或将sample_plugins.ini改名为plugins.ini


II. 命令行
=============================================================================
查阅AMX的全部有效命令,在您的控制台输入“amx”。
如果您得到的是错误反馈信息,说明您没有正确安装AMX

III. 编写插件
=============================================================================
您可以访问: http://www.compuphase.com/smalldoc.pdf 获得入门帮助

了解AMX的脚本定义您可以进入"addons/amx/examples/include" 阅读里面的.inc文件
另外一个好办法是访问AMX的 http://amxmod.net/amx-plugins.php

AMX 使用的脚本语言同AdminMod是一样的



IV. 编译插件
=============================================================================
Enter to "addons/amx/examples" path where you will find files "sc.exe"
for win32 and "sc" for linux. These are compilers for AMX scripts.

To compile your script (files with "sma" extension), put it into
"addons/amx/examples" directory and run proper compiler passing the
name of your script filename as an argument (for win32 you may run
"compile.bat" and under linux "compile" to get all files with "sma"
extension compiled in "addons/amx/examples/compiled" directory).

Plugins compiled under win32 work on linux and vice versa.


V. 设置
=============================================================================
AMX has several options which allow you to run the same program
on multiple sessions. To achieve it you have to run your dedicated server
with additional parameters in command line.

Here is a list with short description:
amx_basedir - By default set to "addons/amx". This localinfo is used
by scripts written in Small to get location of their configuration files.

amx_logdir - By default set to "addons/amx/logs". Describes folder where
logs send by log_to_file native are stored. Note that a directory must be
created by a system user.

amx_modules - By default set to "addons/amx/config/modules.ini". Position of
a file with list of AMX modules to load. Note that some modules require to
be linked also by metamod (these which are related to game modification)
(a safe way to identify them: their name contains '_mm').

amx_plugins - By default set to "addons/amx/config/plugins.ini". Describes
a file with list of AMX plugins to load. Compiled plugins must be in
the same folder where the file is placed.

amx_usejit - By default set to "config". Sets when plugins have to be used
with the JIT (Just-In-Time compiler, introduced in v0.9.9, allowing 10+
times faster plugin execution). This can take three values: 'never', 'config'
and 'always'. 'never' will run all the plugins with the (old) (slow)
interpreter, 'always' will run them all with the JIT, and 'config' (which is
the default, right?) will let you specify 'nojit' right after any plugin
filename in addons/amx/config/plugins.ini if you don't want it to be run by
the JIT.

amx_vault - By default set to "addons/amx/config/vault.ini". This is the
location of the file where vault data are stored.

csstats_score - By default set to "addons/amx/plugins/csstats.amx". This is
the location of the file by which a score is evaluated.

csstats - By default set to "addons/amx/modules/csstats.dat". This is the
name of the file where rank is stored in a binary form.

All these settings above should be put in a command
line with +localinfo in front. For example:
./hlds_run -game cstrike +localinfo amx_logdir "addons/amx/logs_27016"

There is also other anotherpossibility to configure AMX. You have to create
a file i.e. "addons/amx/config.ini" and put there settings:

; Configuration file for AMX
amx_basedir        addons/amx
amx_logdir        addons/amx/logs
amx_modules        addons/amx/config/modules.ini
amx_plugins        addons/amx/config/plugins.ini
amx_vault        addons/amx/config/vault.ini
csstats_score        addons/amx/plugins/csstats.amx
csstats                addons/amx/modules/csstats.dat

Now you can run a server with: +localinfo amx_cfg "addons/amx/config/config.ini"


VI. Troubleshooting, FAQ
=============================================================================
The best place to ask a question and get an answer is to go to the
amxmod.net forum. However before posting any questions make sure that
an answer is not already posted, use Search engine of forum.

Here is a bunch of most common questions.

Q: I get "[AMX] Function not found (name "xxx") (plugin "xxx")" and
   a plugin name given in this message is not loaded properly.
A: This is because you have not installed properly modules, which
   extends functionality of AMX. Type 'amx modules' and 'meta list' to
   get a list of modules you run.

Q: I've switched from AMX 0.9.3 to AMX 0.9.9 and whenever I start up
   the server it just doesn't load a map but exits with
   "Couldn't find "AMX_Query" (file "xxx")" message.
A: This is because AMX 0.9.9 has new interface for modules. You
   need to upgrate your old modules (VexdUM, Fun, Warcraft 3 etc.)
   to newer. Fun, MySQL, and CSStats are already included in AMX 0.9.9
   package, as well as the third-party module VexdUM.

Q: How do I add a new admin account?
A: Enter to "addons/amx/users.ini" and read carefully comments and
   examples posted below. Example account looks like this:
   "My Name" "my_password" "abcdefghijklmnopqrstu" "a"
   Where first parameter can be autid, name or ip, second is a password
   which have to be set in config file of a user, third parameter is an
   access and last parameter are flags. Two last parameteres are briefly
   described in comments of users.ini file. Make sure that in front
   of account line there is no ; char.
   
Q: What are most important changes since AMX 0.9.3 about
   which should I know?
A: o File admin.cfg has been changed to amx.cfg
   o There is no more amx_admin command, accounts are
     stored in "users.ini".
   o Native log_to_file() needs only filename, path is auto added
     which is set by "amx_logdir" localinfo.
   o This documentation has been udpated, read it again :)
   o There are serveral settings to support few servers run on the same
     machine. Read "Settings" section for vars to set. There are
     also some stock functions in "amxmisc.inc" file.
   o The get_user_wonid() native has been removed.
   o AMX has builded in log events, so it can catch "round start",
     "round end" and serveral other logged messages.
   o There is new client_authorized() forward function which
     has been provided to support steamid.
   o You shouldn't use old plugins from AMX 0.9.3. These which
     are in default package should be upgraded and rest from
     contributors should be recompiled.

Q: What should I treat as authid/steamid?
A: Enter to game as player and type in your console "status".
   You will get a respond with some details about you and few other
   currently connected players. Your authid/steamid should look for
   example like "STEAM_0:0:1234" or "STEAM_0:1:2323". For listenserver
   it will be "STEAM_IS_LOOPBACK". This value you should put in first
   field of an admin account in "addons/amx/users.ini".

Q: 我能在哪里获得更详细的插件细节?
A: Read comments and a content of plugin_init function in a plugin
   source. Also the useful commands are:
   amx_help - Lists all commands available for an admin account.
   With this command you get an answer of how to configure stats,
   pause/unpause plugins and use admin commands.
   amx cmds - This should be typed in a server console. It lists all
   commands registered by plugins with theirs access flags.
   amx cvars - This should be typed in a server console. It lists all
   cvars registered by plugins.

Q: 我还有更多问题,哪里可以找到答案?
A: 在AMX论坛的"Bugs & Troubleshooting"版面提问,但是请先确认您的答案已经在置顶的贴里给出。


VII. Changelog(省略)
回复

使用道具 举报

发表于 2005-2-22 16:30:58 | 显示全部楼层 来自 中国–陕西–西安
辛苦了,精华
回复

使用道具 举报

发表于 2005-2-22 16:36:41 | 显示全部楼层 来自 中国–云南–曲靖
打个包把整站拿来共享!
回复

使用道具 举报

发表于 2005-2-22 16:38:01 | 显示全部楼层 来自 中国–北京–北京
沙发被抢,软座被占,来个板凳爽一下~
支持~
回复

使用道具 举报

发表于 2005-2-22 16:58:30 | 显示全部楼层 来自 中国–河南–安阳
无愧于精华帖子  :2:
回复

使用道具 举报

发表于 2005-2-22 18:47:07 | 显示全部楼层 来自 中国–北京–北京
不错,我现在使用的是DT下载的AMX0.9.5版,好象功能差不多啊
回复

使用道具 举报

发表于 2005-2-22 19:11:54 | 显示全部楼层 来自 中国–宁夏–银川
嘿 期待了很久了 终于出来了 ^^

下一个应该是AMXX的中文文档了吧
回复

使用道具 举报

发表于 2005-2-22 21:26:40 | 显示全部楼层 来自 中国–安徽–芜湖
绝对支持再弄个文件包给大家下载保存吧!
回复

使用道具 举报

发表于 2005-2-24 12:32:15 | 显示全部楼层 来自 中国–湖北–武汉
好帖子
有你们的努力,这个论坛才会更好~!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表