精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● FreeBSD>>系统设置>>软件安装与设置>>在FreeBSD下架设反恐精英(Counter Strike)服务器(三)

主题:在FreeBSD下架设反恐精英(Counter Strike)服务器(三)
发信人: fly_ryu(风之铃)
整理人: zhcharles(2002-02-18 16:17:47), 站内信件
安装Admin mod
Admin mod是半条命(half life)下的管理工具,它完全支持Counter Strike,提供了更多的管理功能,并且可以使用反作弊插件(如csguard)
首先我们得到Admin mod程序包,下载地址 http://down2.ykol.net/halflife-admin-2.50.26.tgz将它保存于/game下,解压
tar xvfz halflife-admin-2.50.26.tgz
文件将会解压于Admin目录下,关掉您的half life服务器,进入此目录,安装
cd Admin
./install_admin cstrike (一定要输入mod的名字)
               Adminmod Installation Script
                       Version 2.50.26

   This script will install Adminmod version 2.50.26 on your
   system. It will ask you for the directory that you installed
   the Half-Life server in. To accept defaults just press Return.
   After the binaries are installed you should read the docu-
   mentation and configure Adminmod before you use it for the 
   first time.

Shall I proceed with the installation? (y/n) [y]y

Please enter the directory where your HL server is installed,
or hit Return to accept the default.
[]:  /game/hlds_l (输入您的hlds_l的路径)

Looks like you have cstrike installed in /game/cs/hlds_l.
I can now install the Admin Mod files. Proceed? (y/n) [y] y

Installing binaries and config files ...

Editing your liblist.gam file ...

   The Adminmod files have now been installed. It looks like you 
   had installed a version of Adminmod before. You will still have 
   to edit your server.cfg file in the directory /game/cs/hlds_l/cstrike. 
   If you want to, I can now append the necessary lines to your 
   server.cfg file. But since you have a previous installation you 
   may want to do that by hand. Edit the file in any case because some 
   options may have changed since the last version.

Shall I add the Adminmod lines to your server.cfg file? (y/n) [y]y (是否向您的server.cfg中添加Admin mod的配置行,第一次安装一定要选y)

   Conratulations, Adminmod is now installed.
   To configure it you should now edit your server.cfg file and create 
   users.ini, maps.ini, ips.ini, models.ini and wordlist files as needed.
   Follow the instructions in the documentation and check for more infor-
   mation at the Adminmod website http://www.adminmod.org.

   Enjoy!
现在Admin mod已经安装完毕,接下来要配置您的server.cfg中关于Admin mod部分,注:服务器变量状态可以设置为 "开" 或 "关",0=关 1=开

// 这条信息会显示给每一个完成登陆服务器的玩家,按自己的需要修改
// 成你喜欢的文字
admin_connect_msg "Welcome to my CS-1.3 Server..."

// 这里设定当用户试图执行它没有权限执行的命令时,显示给他的信息。
admin_reject_msg  "You can't access this command."

// 这里定义在游戏过程中每隔多长时间(单位 秒),在 admin_repeat_msg 选
// 项 admin_repeat_msg 里定义的信息会再次显示。
admin_repeat_freq 600

// 这里定义的信息会每隔一段时间,由 message 脚本插件显示在所有在线玩
// 家的屏幕上。
admin_repeat_msg  "Welcome to my CS-1.3 Server"

// 这里定义的文件里设定哪些脚本插件会被装载。
// 这个文件应该在 cstrike 目录下,或者从 cstrike 目录开始的相对目录名。
admin_plugin_file "plugin.ini"

// 这里设定的文件用来保存游戏服务器的地图配置信息。
// 即使在重新启动期间也不会丢失
admin_vault_file  "vault.ini"

// 在这里定义的文件名里,可以定义一些不需要密码验证的 IP 地址。
ips_file 0

// 这里定义的文件名里是可以表决的地图列表,如果设定为 0,将会使用
// 默认的 mapcycle.txt 文件里的地图列表
maps_file 0

// 这里设定管理员登陆时的 setinfo 行中的第一个密码。
password_field mycs

// 这里可以定义你的语言过滤文件,定义为 0 则关闭这项功能,如果打开这
// 项功能,过滤文件可以参看 "wordlist.txt"
words_file 0

// 这个变量是用于 TFC 的,counter-strike 没用。
// ( 0=关 1=开 )
//admin_balance_teams 0

// 如果你要和 Amind Mod 一起使用 bots,请将这一项设置为 1,这
// 可以防止 bots 从客户端收到一些会使服务器当掉的命令。
// ( 0=关 1=开 )
admin_bot_protection 0

// 这个选项设定 CS 服务器里是否使用武器控制。
// ( 0=关 1=开 )
admin_cs_restrict 1

// 这个选项设定 Admin mod 是否运行在调试模式下,在调试模式下你可
// 以在你的记录文件里看到详细的信息,以便发现运行中出现的问题。
// 正常使用中不推荐使用
// ( 0=关 1=开 )
admin_debug 0

// 此选项设定在默认情况下是否可以使用 fun 命令,如果关闭这个选项,
// 管理员依然可以在游戏运行过程中通过命令打开这个选项。
// ( 0=关 1=开 )
admin_fun_mode 1

// 是否给一些特定的命令以一些特殊效果,例如:teleport、slap。
// ( 0=关 1=开 )
admin_fx 1

// 这个选项如果打开,可以阻止那些被阻塞的玩家("被阻塞的玩家"意思是
// 由于其骂人或者其他的某些情况被服务器禁止其 say)改变他们的名称。
// ( 0=关 1=开 )
admin_gag_name 1

// 这个选项如果打开,那些被阻塞的玩家将不能使用 say_team 命令。
// ( 0=关 1=开 )
admin_gag_sayteam 1

// 这个选项如果打开,拥有最高权限的管理员将是游戏中唯一拥有管理员权
// 限的人。例如:游戏中同时有多个管理员在场,只有拥有最高权限的管理
// 员可以使用管理员操作。
// ( 0=关 1=开 )
admin_highlander 0

// 这个选项如果打开,ACCESS_IMMUNITY 将会被忽略使其不起任何作用
// ( 0=关 1=开 )
admin_ignore_immunity 0

// 这里设定一个管理员在没有在 setinfo 行中重新设定他的密码的情况下,
// 从退线到再次重新连线所间隔的时间(单位 秒)
admin_reconnect_timeout 300

// 定义哪些管理员命令信息会在玩家的客户端显示,显示的格式是:
//        "[ADMIN] <user> used command <command>"
// 0=所有的命令包括管理员的名字都会显示
// 1=除了管理员的名字,所有的命令都会显示
// 2=大部分命令都不会显示(除了 "cheat" 命令)
admin_quiet 2

// 是否允许客户端执行命令
// ( 0=不 1=是 )
allow_client_exec 1

// 默认没有在 users.ini 文件里配置的玩家所能执行什么等级的命令
// (你可以在文档中查看各个等级都包含什么命令)
default_access 1

// 是否对用户的密码加密,这个设置只有在 LINUX 下有效。
// 如果定义了这个选项,users.ini 文件里定义的管理员的密码部分
// 要通过 tools/make_pass 命令来生成。
// ( 0=不 1=是 )
encrypt_password 1

// 定义脚本插件是否对文件有读权限
// ( 0=不 1=是 )
file_access_read 1

// 定义脚本插件是否对文件有写权限
// ( 0=不 1=是 )
file_access_write 1

// 如果 pretty_say 被定义,centersay() 函数所发出的信息将会有
// 淡入淡出的效果,和一些其它的功效。
// ( 0=关 1=开 )
pretty_say 1

// 换图表决生效的百分比
map_ratio 80

// 踢人表决生效的百分比
kick_ratio 60

下面添加管理员,比如我们现在的管理员名字为csadmin,密码为mypass
cd /game/Admin/tools
./make_pass csadmin mypass 131071 (131071是最高权限)
将输出的结果复制下来,保存到/game/hlds_l/cstrike/users.ini中,如果没有这个文件,请建立一个

启动您的cs服务器

客户端成为管理员:
在您的游戏cstrike目录下建立一个admin.cfg文件,内容为:
setinfo "mycs" "mypass" (mycs是server.cfg中设置的第一个密码,mypass是刚才设置的管理员密码)
进入游戏,调出控制台,输入exec admin.cfg,您就可拥有管理员权限了,或者在游戏的快捷方式中加上 +exec admin.cfg 即可自动成为管理员
注意:设定的管理员名字,如csadmin,在未成为管理员时是不可以使用的,成为管理员后可以控制台中改名 name csadmin

感谢Find@TX (http://www.mudtx.com) 给我提供的帮助

[关闭][返回]