搜索
查看: 64631|回复: 108

AMX0.99官方手册中文译本

  [复制链接]
发表于 2005-2-22 16:21:43 | 显示全部楼层 |阅读模式 来自 江苏苏州
官方手册中文译本地址:
http://amx.dt-club.net
http://218.4.146.221/hlserver_faq/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.         Installation
  II.         Commands
III.         Writing Plugins
  IV.         Compiling plugins
   V.         Settings
  VI.         Troubleshooting, FAQ
VII.         Changelog


         For more indepth setup and instructions for AMX go here:
                        http://amxmod.net/docs/


I. Installation
=============================================================================
You *must* have Metamod 1.17 or higher installed to use this plugin.

"$moddir" is your Mod directory, f.e. "cstrike" if you run Counter-Strike.

1. Download MetaMod from http://www.metamod.org and install it
   following its instructions.

   NOTE: This package comes with MetaMod 1.17.1.
         If you don't have MetaMod yet, just rename the file
         $moddir/addons/metamod/sample_plugins.ini to plugins.ini.
         Otherwise, merge sample_plugins.ini with your plugins.ini.
         You can also overwrite addons/metamod/dlls/metamod_i386.so
         with a more recent or customized version.

   Just to make sure, after installation, you should get:
     $moddir/addons/metamod/dlls/metamod_i386.so
     $moddir/addons/metamod/plugins.ini

   In $moddir/liblist.gam file instead of:
     gamedll_linux "dlls/cs_i386.so"

   You should have:
     gamedll_linux "addons/metamod/dlls/metamod_i386.so"


2. Unzip this file to $moddir with directory structure.
   You should get:
     $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. Open "addons/metamod/plugins.ini" and make sure it contains
   (line with ; char is a comment):
     ; AMX Mod
     linux addons/amx/dlls/amx_mm_i586.so

   You might have to declare some AMX modules as well if you want to
   use them.
   
   NOTE: AMX Mod beta versions 0.9.7 and 0.9.8 tried to save you from
         declaring your modules in MetaMod.
         AMX Mod 0.9.9 comes back to the previous 0.9.3 system:
         your modules have to be declared both in MetaMod's plugins.ini
         and in AMX's modules.ini (this does not concern AMX-only modules
         like MySQL, GeoIP, MThread, ...).


4. Open "addons/amx/modules.ini" and add
   these lines (if not already exist there):
     ; 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. Make sure you have AMX scripts files under "addons/amx/plugins" path.

   They have to be declared in addons/amx/config/plugins.ini.

   You can also override plugins list filename by setting
   amx_plugins localinfo as a HLDS parameter.
   (f.e. +localinfo amx_plugins "addons/amx/plugins.ini")


NOTES:
   . You can remove CS Stats from modules.ini unless you run
     Counter-Strike with AMX Statistic Plugins
   . MetaMod can use "addons/metamod/plugins.ini" or
     "metamod.ini" file to specify its plugins. If you
     don't have any then create one or rename provided sample_plugins.ini
     to plugins.ini


II. Commands
=============================================================================
To see the list of all available commands for AMX Mod,
type "amx" in the server console. With these commands
you can check version of AMX, list all cvars
and server commands registered by plugins; pause,
unpause plugins; display status and additional info about
plugins and modules.

If none of them works or you get an error message then
you haven't installed AMX properly.


III. Writing Plugins
=============================================================================
For Small basics read: http://www.compuphase.com/smalldoc.pdf

To learn about AMX Mod script functions (natives) go to
"addons/amx/examples/include" path and read contents of all files
with "inc" extension. A good idea is reading code of scriptis
published on AMX web site: http://amxmod.net/amx-plugins.php

Scripting in AMX Mod is the same as it is in AdminMod.
However plugins from first won't run under second and vice versa.


IV. Compiling plugins
=============================================================================
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. Settings
=============================================================================
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: Where can I find more details about plugins?
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: I have more question, where can I ask them?
A: Ask in "Bugs & Troubleshooting" section of amxmod.net forum. But make
   sure that an answers is not already given in sticked posts.


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 04:32:03 | 显示全部楼层 来自 上海嘉定区
支持楼主,好东西大家分享!谢谢
回复

使用道具 举报

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

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