首页 » 技术分享 » windows server 2012 架设csgo服务器

windows server 2012 架设csgo服务器

 

1.下载steam
在这里插入图片描述
2.下载csgo server
在这里插入图片描述
3.在csgo目录下找到srcds.exe
在这里插入图片描述
4.在旁边新建bat文件run.bat

srcds.exe  -game csgo -port 27015 -usercon +sv_setsteamaccount *********+game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust2 -exec server.cfg

27015一般都是这个端口,需要在服务器的安全管理中,打开 自定义-udp-27015
********处为在csgo注册的游戏服务器令牌
如果没有就去https://steamcommunity.com/dev/managegameservers 注册一个
5.然后运行bat文件,刷新上面网址的页面,看是否有登录记录。如果没有说明哪里出错了,没有运行成功。
具体哪里错了可以在bat文件中加-console,让服务器运行为控制台界面。
6.游戏的配置修改,可以存在csgo/cfg目录下新建一个server.cfg
可以参考
http://csgodev.com/csgodev-server-cfg-for-csgo/

hostname "服务器名字"
rcon_password "密码"
sv_password "连接密码"

mp_friendlyfire "1" //启用友好火力
//ff_damage_reduction_grenade "0" //减少手榴弹对队友造成的伤害
//ff_damage_reduction_bullets "0" //减少射门时对队友造成的伤害。
//ff_damage_reduction_other "0" //减少非子弹/手榴弹对队友造成的伤害
mp_autoteambalance "1" //自动平衡团队
mp_autokick "0" //踢空闲或杀队的玩家。
mp_tkpunish "0" //使团队杀手受到惩罚。
sv_alltalk "1" //声音交流,没有团队限制
sv_deadtalk "1" //死去的玩家可以对活着的玩家说话(声音、文字)。
sv_full_alltalk "1" //任何球员(包括观众团队)都可以和其他球员交谈
sv_pausable "0" //如果设为1,任何人都可以暂停。
mp_limitteams "2" //最大数量的团队可能会失去平衡。O关闭。
sv_voiceenable "1" //语音聊天。默认值:1,打开。
sv_allow_lobby_connect_only "0" //如果设置为1,则只允许配对游戏,而不允许直接连接
sv_allow_wait_command "1" //允许或不允许对连接到此服务器的客户端执行wait命令。
sv_cheats "0" //SV欺骗//允许在服务器上欺骗
sv_alternateticks "0" //If set to 1 server only simulates entities on even numbered ticks.
//sv_downloadurl"http://www.yoursitehere.com" //Location from which clients can download missing files
sv_forcepreload "0" //强制服务器端预加载。
sv_friction "4" //World friction.
sv_pure "0" // 0关闭,1使用白名单,2是强制默认值。
sv_consistency "0" // 0 is off and allows skins, 1 is on and forced defaults.
//sv_pure_kick_clients "1" //If set to 1, the server will kick clients with mismatching files.
//sv_pure_trace "0" //If set to 1, the server will print a message whenever a client 
// Round Convars
mp_freezetime "6" //当回合开始时,让玩家保持冰冻状态需要多少秒
mp_afterroundmoney "0" //每轮比赛后奖励给每一位选手的金额
mp_playercashawards "1" //玩家可以通过执行游戏中的动作来赚钱。
mp_teamcashawards "1" //团队可以通过执行游戏中的动作来赚钱。
mp_maxrounds "30" //每个地图的最大轮数
mp_timelimit "0" //整个地图多少分钟
mp_roundtime "2" //每轮需要多少分钟。
mp_freezetime"5" //当回合开始时,让玩家保持冰冻状态需要多少秒
mp_buytime "100" //回合开始后多少秒,玩家可以购买物品。
mp_forcecamera "1" //设置为1表示仅查看团队。
mp_defuser_allocation "2" //如何将defuser分配给CTS以开始或循环:0=无,1=随机,2=有人

mp_death_drop_defuser "1" //玩家死亡时drop defuser
mp_death_drop_grenade "2" //玩家死亡时要扔哪颗手榴弹:0=无,1=最佳,2=当前或最佳
mp_death_drop_gun "1" //在玩家死亡时可以放下哪把枪:0=无,1=最佳,2=当前或最佳
mp_buytime "5" //回合开始后多少秒,玩家可以购买物品。
mp_c4timer "45" //从C4武装到爆炸有多长时间
mp_do_warmup_period "0" //如果不是要在比赛开始时进行热身。
mp_force_pick_time "15" //玩家在团队屏幕上进行选择的时间
mp_halftime_duration "15" //半时持续的秒数
mp_join_grace_time "120" //回合开始后允许玩家加入游戏的秒数
mp_match_end_restart "1" //在匹配结束时,执行重新启动而不是加载新映射
mp_maxrounds "30" //每张地图的最大轮数
mp_playercashawards "1" //玩家可以通过执行游戏中的动作来赚钱。
mp_playerid "0" //控制玩家在状态栏中看到的信息:0所有名称;1个团队

姓名;2无姓名
mp_playerid_delay "1" //在状态栏中显示信息的延迟秒数
mp_playerid_hold "0" //在状态栏中继续显示旧信息的秒数
mp_restartgame "2" //如果不是零,游戏将在指定的秒数内重新开始
mp_round_restart_delay "7" //v
mp_roundtime "3" //每轮需要多少分钟。
mp_warmuptime "25" //如果是这样,在每一场比赛开始时都会有一个热身期/回合
mp_win_panel_display_time "5" //允许连接。
// The Bot Convars

bot_difficulty 3 //定义机器人加入游戏的技能。值为:0=简单,1=正常,2=硬,3=专家。
bot_chatter "normal" //控制bots的通话方式。允许值:"off"、"radio"、"minimal"或"normal"
bot_join_after_player 1 //如果非零,bot会等到玩家加入后再进入游戏。
bot_quota 10 //确定游戏中机器人程序的总数。
bot_quota_mode "match" //确定配额类型
// Logging

//log on //This is set to turn on logging!
sv_log_onefile "0" //只将服务器信息记录到一个文件中。
sv_logbans "0" //log server bans在服务器日志中。
sv_logecho "1" //将日志信息回送到控制台。
sv_logfile "1" //在日志文件中记录服务器信息。
sv_logflush "0" //每次写入时将日志文件刷新到磁盘(慢)。
sv_logsdir "0" //游戏目录中的文件夹,服务器日志将存储在其中。
// Server Rates

sv_maxrate "0" //服务器上允许的最大带宽速率,0==无限制
sv_mincmdrate "10" //这设置cl_CmdRate的最小值。0=无限制。
sv_minrate "5000" //服务器上允许的最小带宽速率,0==无限制
//CVARS for bhopping
sv_accelerate "10" //加速。默认值10
sv_friction "4" //世界摩擦。默认值4
sv_staminajumpcost "0" //跳跃的耐力惩罚。默认值。1
sv_staminalandcost "0" //着陆时的耐力惩罚。默认值。1
sv_staminamax "80" //耐力最大值惩罚。德古尔特80
sv_staminarecoveryrate 1000" //体魄恢复率"50"/(单位/秒)50

// Money cvars

mp_startmoney "800" //每个玩家重置后获得的金额。
mp_maxmoney "20000" //玩家帐户中允许的最大金额。
cash_team_terrorist_win_bomb "2200" //小组将赢得多少炸弹。
//cash_team_elimination_hostage_map "2200" //当一个玩家消灭所有人质时,他能赚多少钱
cash_team_elimination_bomb_map "2200" //当炸弹被清除时,小组将赢得多少胜利。
//cash_team_win_by_time_running_out "2200" //当时间用完时,小组会赢多少。
cash_team_win_by_defusing_bomb "2200" //拆弹后球队将赢得多少胜利。
cash_team_win_by_hostage_rescue "2200" //当所有人质获救后,队伍会赢多少。
cash_team_loser_bonus "2000" //当团队放松时,团队将赢得多少。
cash_team_loser_bonus_consecutive_rounds "500" //当团队失去连续500轮时,团队将赢得多少。
cash_team_rescued_hostage "100" //当球队救出人质时,他们将赢得多少胜利。
cash_team_hostage_alive "0" //当人质还活着时,队伍能赢多少钱
cash_team_planted_bomb_but_defused "200" //How much the team will win when when a team has planted a bomb and been defused
cash_team_hostage_interaction "50" //How much the team will win when hostages are saved
cash_player_killed_teammate "-3300" //How much the player will loose when a teamate has been team killed
cash_player_killed_enemy_default "200" //How much the player will win when killing an enemy
cash_player_killed_enemy_factor "0.5" //How much the player will win when killing an enemy
cash_player_bomb_planted "200" //How much the player will win when the bomb has been planted.
cash_player_bomb_defused "200" //How much the player will win when the bomb has been defused
cash_player_rescued_hostage "200" //How much the player will win when rescuing hostages
cash_player_interact_with_hostage "0" //How much the player will win when interacting with hostages
cash_player_damage_hostage "-30" //How much the player will loose when demaging a hostage
cash_player_killed_hostage "-1000" //How much the player will loose when a hostage has been killed
// Voting Options

sv_allow_votes "1" //允许投票"1//打开和关闭服务器投票。
sv_vote_allow_spectators "0" //允许观众"0"//允许观众投票?"
sv_vote_command_delay "2" ///投票通过后多久,直到行动发生
//sv_vote_creation_time "120" //有人可以单独呼叫投票的频率。
sv_vote_failure_timer "300" //失败的投票不能在这么长时间内重新提交。
sv_vote_quorum_ratio "0" //T对某个问题进行投票以解决问题所需的参与者的最小比率。
sv_vote_timer_duration "15" //允许对某个问题投票多长时间

 

sv_lan "0" //应该一直设置,所以你知道它没有打开
sv_region "255" //要在其中报告此服务器的世界区域。
sv_tags "CSGODEV" //服务器标签。用于在客户端浏览时向其提供额外信息
writeid
writeip
exec banned_user.cfg
exec banned_ip.cfg

7.在没有console的界面控制台中输入exec server.cfg,就会配置,如果哪条命令不识别会显示出来。

转载自原文链接, 如需删除请联系管理员。

原文链接:windows server 2012 架设csgo服务器,转载请注明来源!

0