Zh/Counter-Strike: Global Offensive/Dedicated Servers: Difference between revisions
(→Maps) |
(→高级设置) |
||
Line 172: | Line 172: | ||
sv_cheats 0 //关闭作弊,这个就应该这么设置,别改 | sv_cheats 0 //关闭作弊,这个就应该这么设置,别改 | ||
sv_lan 0 //不仅局域网联机,这个就应该这么设置,别改 | sv_lan 0 //不仅局域网联机,这个就应该这么设置,别改 | ||
exec banned_user.cfg | exec banned_user.cfg //黑名单用户 | ||
exec banned_ip.cfg | exec banned_ip.cfg //黑名单IP | ||
=== server.cfg === | === server.cfg === | ||
Line 184: | Line 184: | ||
mp_autoteambalance 1 //开启队伍平衡 | mp_autoteambalance 1 //开启队伍平衡 | ||
mp_limitteams 1 //队伍最多允许相差人数 | mp_limitteams 1 //队伍最多允许相差人数 | ||
writeid | writeid //白名单用户 | ||
writeip | writeip //白名单IP | ||
=== gamemodes.txt === | === gamemodes.txt === |
Revision as of 04:08, 10 December 2019
此页面概述了设置和运行《反恐精英:全球攻势》专用服务器的基础知识。


下载 CS:GO 专用服务器
本段介绍了更新 CS:GO 专用服务器的方法。每次游戏更新时都需要执行这些步骤。若想在未来自动执行此步骤,请参见:自动执行Steam。
1. 下载并安装 SteamCMD。
2. 启动 SteamCMD。在看到 Steam> 提示符后设置你的 CS:GO 专属服务器安装路径。

示例代码:
- Windows 操作系统:
force_install_dir c:\csgo-ds\ force_install_dir .\csgo-ds\
- Linux 操作系统:
force_install_dir /full/path/to/csgo-ds/
3. 安装或升级 CS:GO。 如果您是第一次安装或需要检查服务器文件的完整性:
app_update 740 validate
如果只是对先有服务器进行更新:
app_update 740
4. 一旦完成安装,请在 Steam> 提示符后输入 quit 命令来退出 Steam 。
注册服务器登录令牌
如果您的服务器没有使用服务器登录令牌(GSLT)登录永久性游戏服务器账号, 则您的 CS:GO 游戏服务器和 GOTV 观战系统将只允许同一局域网内的客户端以 RFC 1918 的 IP 地址连接。
RFC 1918 是指私有网络地址分配,其中包含的 IP 地址范围是:
10.0.0.0-10.255.255.255 172.16.0.0-172.31.255.255 192.168.0.0-192.168.255.25
如果您的服务器有一个公网 IP 地址,并且客户端需要从互联网访问服务器,则需要注册一个服务器登录令牌(GSLT)。
注册服务器登录令牌(GSLT)的过程非常简单,请访问此网站并根据提示注册: http://steamcommunity.com/dev/managegameservers (无需担心,一个合格的账户允许注册1000个服务器令牌)
每个服务器登录令牌(GSLT)只允许在一个游戏服务器示例上使用。这意味着如果您有多台 CS:GO 服务器,则需要为每一台服务器生成一个独一无二的令牌。
令牌在启动服务器时,通过在命令行中添加 +sv_setsteamaccount <十六进制令牌>
来使用。您也可以通过添加 -net_port_try 1
命令来验证令牌的唯一性.
对了,凡是使用了令牌登录的公网服务器都必须严格遵守我们的服务器操作指南: http://blog.counter-strike.net/index.php/server_guidelines/
启动服务器


srcds
替换为 ./srcds_run
;
+sv_setsteamaccount <十六进制服务器令牌> -net_port_try 1
命令以使用GSLT(游戏服务器登录令牌)。休闲模式:
srcds -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2
竞技模式:
srcds -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2
军备竞赛模式:
srcds -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots
爆破模式:
srcds -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_lake
死亡竞赛模式:
srcds -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic +map de_dust

csgosl - 一个跨平台的 CSGO 图形化界面
github wiki (with pics) download
csgosl is a graphical user interface for the Counter Strike Global Offensive Dedicated Server (CSGO server from now on). csgosl supports one-click install, update, start and stop server on windows and linux platforms (supported platforms). If you just want your own CSGO server up and running in no time this is the place for you. csgosl supports most mainstream server options. For the advanced user exits the advanced mode providing support for nearly any setting.
csgosl features:
- Completely automatic install (steamcmd + srcds + metamod/sourcemod/plugins)
- Server update, automatic or manual
- Start/monitor/stop server
- Host lan only or public servers
- Host workshop maps and map groups
- Manage all your maps and create your own map groups using the map group editor
- Easily view and select all installed maps using map previews
- Greatly simplified server settings with reasonable defaults
- Advanced settings mode for the control freak (supports all cvars with in app help texts)
- Override settings in one place for all game modes/types
- Online help easily accessible from the application
- Comes preinstalled with sourcemod, metamod and some plugins
Linux 脚本
csgo-server-launcher
A simple script has been created to manage the server. It was tested on Debian and Ubuntu distributions and it can create, start, stop, restart, update the server. You can also display the console via the console command. If you are in console mod, don't forget to press CTRL+A then D to stop the screen without stopping the server.
Features
- start - Start the server with the PARAM_START var in a screen.
- stop - Stop the server and close the screen loaded.
- status - Display the status of the server (screen down or up)
- restart - Restart the server (stop && start)
- console - Display the server console where you can enter commands.
- update - Update the server based on the PARAM_UPDATE then save the log file in LOG_DIR and send an e-mail to LOG_EMAIL if the var is filled.
- create - Create a server (script must be configured first).
This script is available on GitHub : csgo-server-launcher
LGSM csgoserver
Part of Linux Game Server Managers scripts, csgoserver is a command line tool for quick, simple deployment and management of a Counter Strike: Global Offensive Linux dedicated server.
Main Features
- Server installer (SteamCMD).
- Loads of default start parameters (including workshop support)
- Start/Stop/Restart server.
- Server console.
- Server monitoring (including email notification).
- Server update (SteamCMD).
- Server backup.
Compatibility
The Linux Game Server Manager is tested to work on the following Linux distributions :
- Debian based distros (Ubuntu, Mint etc.).
- Redhat based distros (CentOS, Fedora etc.).
Get the script at gameservermanagers.com.
Get more info : Github Wiki.
Get help : LGSM Steam group.
Windows 软件/脚本
SteamCMD GUI
这个工具可以让用户在 Windows 上使用 SteamCMD 时无需接触命令行与批处理文件。
GitHub 地址: https://github.com/DioJoestar/SteamCMD-GUI.git
pyr0s-csgo-server-launcher
一个简单的脚本来启动 3 种不同的服务器,在任意 4 中游戏模式中可用。 我第一次尝试任何形式的脚本。
URL : http://code.google.com/p/pyr0s-csgo-server-launcher/
高级设置
配置你的全新《反恐精英:全球攻势》服务器,区别于服务器管理员所看到的过去的专用服务器。我们会讲到其中的主要区别。
autoexec.cfg
这个文件位于 \csgo\cfg 。
这个文件会在第一张地图被加载之前执行。 valve.rc 执行 autoexec.cfg ,并在下一句命令 stuffcmds ,将从命令行中执行带 + 的参数
在你的 autoexec.cfg 中,你只需要设置一次指令:
log on //这会启用日志记录,别把这个放在 server.cfg 文件中 hostname "Counter-Strike: Global Offensive Dedicated Server" //服务器名称 rcon_password "yourrconpassword" //你的rcon密码(远程管理服务器) sv_password "" //只有在你打算搭私人服务器时才需要这个选项! sv_cheats 0 //关闭作弊,这个就应该这么设置,别改 sv_lan 0 //不仅局域网联机,这个就应该这么设置,别改 exec banned_user.cfg //黑名单用户 exec banned_ip.cfg //黑名单IP
server.cfg
server.cfg 文件在 \csgo\cfg 目录下(如果没有就自己新建一个)
这个文件在每次切换地图时加载,并在下面列出的 gamemode 文件之前。 这里是一个非常简单的 server.cfg 文件示例:
mp_autoteambalance 1 //开启队伍平衡 mp_limitteams 1 //队伍最多允许相差人数 writeid //白名单用户 writeip //白名单IP
gamemodes.txt
这个文件位于 \csgo\ 文件夹中。
本质上,这个文件是 Valve 定义的标准 "规则" 。例如,在休闲模式会自动为 CT 提供拆弹工具,而在竞技模式中则会像以前的 CS 一样被要求玩家手动购买。您不应该编辑这个文件,因为 Valve 可能会随时决定或更改任何特定模式的规则。如果您自定义了此文件,您的改动将会在服务器更新时被覆盖。
尽管您不应该编辑这个文件,但是对这个文件的修改仍然是有效的。找到您想编辑的部分,您便会看到一组您可以设置的参数。同样,您需要在 gamemodes_server.txt 做出实际修改。
文件的每一个部分由游戏类型分隔。游戏类型包括休闲模式、竞技模式、军备竞赛模式(gungameprogressive)、爆破模式(gungametrbomb)和死亡竞赛。
gamemodes_server.txt
这个文件必须存在,或者生成自 gamemodes_server.txt.example 放在 \csgo\ 文件夹中。 这个文件允许服务器管理员在他们的服务器上自定义每种游戏模式。这将覆盖 Valve 默认的 gamemodes.txt。例如,使用这份文件,您可以修改一场比赛的最大局数或者启用友方火力但降低伤害。
与 gamemodes.txt 文件保持相同的层次结构和语法非常重要!!! 服务器在安装时包含一个 gamemodes_server.txt.example 文件来帮助您学习语法。标准服务器中,一开始并没有 gamemodes_server.txt 这样一个文件。您必须复制、重命名或者创建一个新的 gamemodes_server.txt 文件去应用您的游戏模式。
Bots
您可以修改下面的内容,来改变机器人的数量、它们在服务器上的分布、以及它们的聊天程度:
"bot_quota_mode" "fill" // 填充方式:填满空位 "bot_defer_to_human_items" "1" "bot_defer_to_human_goals" "0" "bot_difficulty" "1" // 机器人难度:1 "bot_dont_shoot" "0" // 机器人无害:关闭 "bot_chatter" "normal" // 机器人无线电:普通 "bot_autodifficulty_threshold_low" "-2.0" // 机器人自动难度门槛低值:值在 -20.0 到 20.0 之间,(最低人类平均分,低于此分数机器人会提高难度) "bot_autodifficulty_threshold_high" "0.0" // 机器人自动难度门槛高值:值在 -20.0 到 20.0 之间,(高于人类平均分,超过此分数机器人会降低难度)
Round Convars
The following convars can be changed to update how the rounds are played out. You can change from round limits to time limits, to how long you force players to freeze in place to buy to forcing the camera to only specatating your team members while dead. Each convar is set specifically for each game type, so you'll have to go through each of the different game modes to get them all updated! These may be overridden by settings in cfg/gamemode_XXX.cfg and cfg/gamemode_XXX_server.cfg, the details of which are specified below.
"mp_afterroundmoney" "0" "mp_playercashawards" "1" "mp_teamcashawards" "1" "mp_maxrounds" "30" "mp_timelimit" "0" "mp_roundtime" "2" "mp_freezetime" "15" "mp_buytime" "45" "mp_forcecamera" "1" // Set to 1 for team only spectating. "mp_defuser_allocation" "0" "mp_death_drop_gun" "1" // 0=none, 1=best, 2=current or best "mp_death_drop_grenade" "2" // 0=none, 1=best, 2=current or best "mp_death_drop_defuser" "1"
Gun Game and Demolition Progression
You'll find convars available to update how the server progresses individuals through the weapons in both Gun Game modes. You can set the weapon order and the kill requirements in order to move on to the next weapon. These convars are separated by team, so be careful to make changes for both sides or you could potentially unbalance the matches on your server.
As an example, here is a list of the convars of weapon progression on Arms Race for a single team:
"mp9" { "kills" "1" } "mac10" { "kills" "1" } "mp7" { "kills" "1" } "bizon" { "kills" "1" } "ump45" { "kills" "1" } "p90" { "kills" "1" } "nova" { "kills" "1" } "mag7" { "kills" "1" } "xm1014" { "kills" "1" } "sawedoff" { "kills" "1" } "galilar" { "kills" "1" } "famas" { "kills" "1" } "ak47" { "kills" "1" } "m4a1" { "kills" "1" } "sg556" { "kills" "1" } "aug" { "kills" "1" } "awp" { "kills" "1" } "m249" { "kills" "1" } "negev" { "kills" "1" } "glock" { "kills" "1" } "hkp2000" { "kills" "1" } "tec9" { "kills" "1" } "p250" { "kills" "1" } "deagle" { "kills" "1" } "fiveseven" { "kills" "1" } "elite" { "kills" "1" } "knifegg" { "kills" "1" }
Here is an example of the weapon progression on Demolition for a single team:
"m4a1" { "kills" "1" } "p90" { "kills" "1" } "ump45" { "kills" "1" } "deagle" { "kills" "1" } "nova" { "kills" "1" } "fiveseven" { "kills" "1" } "hkp2000" { "kills" "1" } "ssg08" { "kills" "1" } "awp" { "kills" "1" } "Scar20" { "kills" "1" }
Note that Arms Race uses random weapons by default. To force the custom list to be used, set mp_ggprogressive_use_random_weapons
to 0
.
gamemode_casual_server.cfg
Files gamemode_casual_server.cfg and gamemode_casual.cfg reside in the cfg directory. The latter (gamemode_casual.cfg) is configured by Valve, and contains the convars that are set at the beginning of each Classic Casual match (they are set each time the server loads a map). A similar file exists for each game mode (replace casual with the appropriate mode ie. competitive, or armsrace). The format of this file is simple, it is "convar setting //optional comment
". For example, from gamemode_casual.cfg:
bot_autodifficulty_threshold_high 0.0 // Value between -20.0 and 20.0 (Amo... cash_player_bomb_defused 200
Admins should not modify the gamemode_XXX.cfg files. Valve's file naming convention suggests that these files may be modified in the future, and your settings may be overwritten. Instead, modify the file ending in _server.cfg you create.
Each gamemode_XXX.cfg file may have a corresponding gamemode_XXX_server.cfg file within the cfg directory. Valve's file naming convention suggests that _server.cfg files will not be overwritten by future updates. Any settings specified in the _server.cfg file will override those in the original config file because the _server.cfg file is executed after it. This ordering is visible within gamemodes.txt .
Settings in gamemode_XXX.cfg and gamemode_XXX_server.cfg seem to override those within gamemodes_server.txt, and server.cfg. Furthermore, it's easier to modify the settings in gamemode_XXX_server.cfg due to the formatting.
When modifying settings, the amount of spaces or tabs between convar and setting seems to be irrelevant, but there must be some. Comments are single-line C++ style, and must come only after a //.
Once you've launched your dedicated server, you can type in the following command to output all available convars that can be altered:
//The output file will be located in the csgo folder of your dedicated server cvarlist log cvarlist.txt
Maps
游戏不再使用 maplist.txt 文件,您的游戏现在由地图组控制。服务器必须使用 mapgroup 或者 workshop_collection ,否则地图将无法正常循环。请参阅 gamemodes_server.txt.example 文件的 mapgroup 示例。
FAQ 和 已知问题
For known issues and workarounds, please visit CSGO DS known issues.