Home
Discussion Forums
Introduction
Starting Up
Updating
Configuration
Server Hardware
CVARs
Networking
Remote Admin
Voice Compression
Ressource Tweak
Custom Maps
Promoting
Metamod
Admin Mods
Bonus Stuff

Back... Parameters Run as Service

Parameters

The console mode is more complex than GUI, but it's also more flexible. Most of this flexibility is described by parameters.

Parameters are commands that initially tell a program what to do. In our case, the parameters will tell HLDS how to start, what map to put, specify the player limit and the server's name. As you may have realized, these are CVARs which need to be initially imput before HLDS can start.

Because we specify everything in the command line, HLDS won't bring up any dialog and everything will be done automatically. This is great because we could now run it as a startup program or even a service! Enough talking, let's see how to use parameters.

Where to input parameters?
You'll input the parameters on a created shortcut, here are the three easy steps:

1. Create a shortcut to HLDS2. Right click the newly created shortcut and then click properties3. You'll input the parameters after the target location, just like shown in the screenshot except you won't write PARAMETERS GO HERE, but you'll write the parameters.

Now, on with the available parameters. Here is a list of accepted parameters in HLDS:

  • -console
    Specifies to HLDS to run in console mode

  • -game
    Specifies to HLDS which game (mod) to run

  • +port
    Specifies to HLDS which port to use

  • +hostname "SERVERNAME"
    Specifies the name of the server. Replace "SERVERNAME" by your server's name.

  • +map
    Specifies to HLDS which map to start.

  • +maxplayers
    Specifies to HLDS how many player slots the server can contain.

  • -autoupdate
    Specifies to HLDS to update itself. Note: This feature sometimes fail on major updates.

Finnaly, here's an example of what the target line would be for most servers. Simply change the required information to yours and use it on your server!

C:\HLServer\hlds.exe -console -game cstrike +port 27015 +hostname "DaBomb Crib" +map de_dust +maxplayers 15 -autoupdate

Now, you can follow to the next sub-section called "Run as Service" to know how you can run HLDS as a service and increase it's stability and performance.


Home • About HLDS 101 • email • Contact • Terms Of Service • Legal Credit • Donate • Clan Hosting • Advertising • Paid Support