Counter-Strike 2 server.cfg gerador

server.cfg é uma lista de comandos da consola, e a armadilha é que algumas definições não podem ser aplicadas a partir dela.

Começar com um preset

Definições Visuais

Formato source
Identity

Server name in the browser. Quote it — this format separates command and value with a space, not an equals sign.

Gameplay

Rounds per map. 0 means unlimited.

Minutes per map. 0 disables the time limit.

Seconds of buy time at the start of each round.

Round length in minutes. Competitive uses 1.92, which is 115 seconds.

Money cap per player.

Team damage.

Lets both teams hear each other on voice.

Cheat commands. Leave off on anything public.

Players & Access

Join password. Blank means public.

Network

Game server login token from your Steam account. Without it the server works but never appears in the community browser — this, not your ports, is usually why a reachable server is unlisted.

LAN mode. On, the server will not answer external queries at all.

RCON & Query

Remote console password. Change it, and do not leave the RCON port open to the internet.

server.cfg

rcon_passwordThis is still the example RCON password. Change it, and keep the RCON port off the public internet.
sv_setsteamaccountWithout a game server login token the server will not appear in the public browser, however your ports are configured.
hostname "Spawnly CS2"
sv_password ""
rcon_password "changeme"
sv_setsteamaccount 
mp_maxrounds 24
mp_timelimit 40
mp_freezetime 15
mp_roundtime 1.92
mp_maxmoney 16000
mp_friendlyfire 1
sv_alltalk 0
sv_cheats 0
sv_lan 0

Como funciona a sintaxe do server.cfg

Cada linha é um comando e o seu valor separados por um espaço, não por um sinal de igual. Os valores com espaços precisam de aspas; os números não. Os booleanos são 1 e 0. Um comando não reconhecido produz um erro - a consola simplesmente passa para a seguinte, o que é por isso por isso fácil de perder aqui.

O erro que custa horas às pessoas

Vários ajustes só fazem efeito se forem definidos no lançamento em vez de em server.cfg, porque o servidor já os usou quando lê o ficheiro. O mapa inicial é o exemplo habitual. Se um ajuste funcionar quando digitado no console mas não em server.cfg, é isso que estás a enfrentar.

Suporte e Ajuda