Half-Life Dedicated Server

These command-line parameters are used with hlds.exe for Goldsource (Half-Life) games.

 Note:Command parameters are described inside the < and > characters.

Syntax: hlds.exe <parameter1> <parameter2> <cvar1> <cvar2>

Examples

  • hlds.exe -console -game cstrike +sv_lan 0 +maxplayers 22 +map de_dust2
  • ./hlds_run -game cstrike -autoupdate -pingboost 2 -port 27016 +maxplayers 20 +map de_dust2

Command-line parameters

  • -condebug - Stores console output to "Half-Life\qconsole.log".
     Note:Can be toggled with condebug console command.
  • -dev - Enables developer mode.
  • -autoupdate - The server is searching for updates on startup (no longer works?[confirm]).
  • -console - HLDS will run in console mode (Windows only).
  • -game <game> - Specifies which game/mod to run. Default is "valve".
  • -dll <name.dll> - Specifies which DLL to use. Ex: -dll addons\metamod\dlls\metamod.dll.
  • -nomaster - Disable communication with Master server. Use this parameter if you do not want your server to be listed in Server Browser.
     Note:Also disables server queries.
  • -insecure - Disables Valve Anti-Cheat technology.
  • -port <port> - Specifies which port to use for client connections. Default is 27015.
     Note:Can do the same with port console variable.
  • -sport <port> - Specifies the VAC port the server should use. Default is 26900.
     Note:You only need to change -sport if VAC connections fail through the primary port.
  • -noip - Disables network support.
  • -noipx - Disables IPX support.
  • -tos - Enables the LOWDELAY TOS header in the udp/ip packets the server generates. (Linux only)
  • -nobreakpad - Let plugin authors still get old style minidumps if they need it (win32 only)
  • -num_edicts <variable> - Sets the entity limit for map/game entities (not temporary entities, which is still locked to 500). 900 is default. 4096 is a good limit, beyond that seems to cause hunk_alloc errors[confirm]. Both clients and servers need matching values for best compatibility[confirm].
  • -heapsize <kilobytes> - Specifies the amount of heap(or free store - cache, an area of memory used for dynamic memory allocation) the engine will use. Minimum value is 14336(14 MB). Maximum value is 131072(128 MB). By default this is set to 40960 (40 MB) and automatically adjusted to suit your system.
     Note:Low value causes "Unable to allocate X.X MB" exit error.
  • -zone <bytes> - Specifies the amount of Bytes of memory for use with the console system.
     Note:Low value causes Z_Malloc exit error.
  • -maxplayers <number> - Sets the maximum number of players that will be able to join your server.
     Note:Can do the same with maxplayers console variable.
  • -sys_ticrate - Overrides sys_ticrate cvar.
  • -exec <file> - Execute specific config file immediately after the engine is loaded.
  • +<console variable> <arg> - Sets the Cvar (or console variable) to the specified setting.

Useful console variables

  • +hostname "Server Name" - Specifies the name of the server.
  • +ip <address> - Specifies the IP when multiple network cards are installed. Required for VAC2 operation.
     Note:Usually you do not need to specify this.
  • +map <map> - Specifies which map to start with.
  • +sv_lan <0/1> - If set to 1, server is only available in Local Area Network (LAN).
  • +mapchangecfgfile <file> - Like Server.cfg, ran after every round change, before Plugins are started.
  • -pingboost <1/2/3> - Selects between optimized HLDS network code stack. Set this on 2 usually reduces latency toward 1ms without loss of activity input packets.

还没有评论,快来抢沙发!

发表评论

  • 😉
  • 😐
  • 😡
  • 😈
  • 🙂
  • 😯
  • 🙁
  • 🙄
  • 😛
  • 😳
  • 😮
  • emoji-mrgree
  • 😆
  • 💡
  • 😀
  • 👿
  • 😥
  • 😎
  • ➡
  • 😕
  • ❓
  • ❗
  • 66 queries in 0.445 seconds