Follow us on Twitter
HLTV Instructions

What is HLTV?

HLTV HLTV is a standalone program that allows you to connect directly to a Half-Life game server and either record demos of the game or allows you to stream a match live over the internet. The HLTV demos allow you to watch the demo back from anyone's point of view, which makes it extremely useful for catching cheats or learning tactics.

How do you connect to an existing HLTV Server?

Searching for a Game
To find a game using HLTV, start Steam, and select Servers from the Steam menu to open the server browser. Click to select the Spectate tab. You can narrow the list of servers by clicking Change filters and selected a specific game. After the list has been updated, double click on a server in the list you want to spectate and you'll be connected.

You Know the IP Address Information
If you already know the ip address information of the HLTV that you are attempting to connect to you can add the ip address to your favorites and connect to it there. Or through your console menu you can type the ip address after the connect command:

Example:
connect 192.168.130.42:27020
(replacing the ip address information given with the ip address information you are attempting to connect to)

The default HLTV port number is 27020. The port number can be changed so make sure you are attempting to connect to the correct port. It may not be running on the same default 27015 port as the game server.

How to Broadcast HLTV (Connect HLTV to Your Game Server)

HLTV is a standalone application that must be enabled before it will run, therefore there is no way to enable HLTV from inside your game server.  If you are renting a server from a game server provider, then they may have to either add HLTV into your account for you or your account may have HLTV already added for you by default.

If you have full control over your server then start the HLTV application by double clicking on the HLTV.exe application in your Counter-Strike directory and the HLTV console will open.

You can name your HLTV server by typing the following into the command prompt that opens:

name "My HLTV Proxy"

Next, you need to connect your HLTV to the game server ip address you want it to run through by typing the following into the command prompt:

connect 192.168.1.3:27015
(The 192.168.1.3:27015 is just an example. Replace that with your game server ip address)

If you now type in "status" into the command prompt it'll give you all of your HLTV server information (ip address, port, etc.)

Camera Angle

Once connected to the HLTV server you can spectate in different modes. Press the "Jump" key to change modes or switch to the spectator menu by pressing the "Duck" key.

Recording Games

You must connect to the HLTV proxy before you can record demos. Type the following into your console window in order to record.

record demoname

Demo recording can be stopped with the command:

stoprecording

The demo files will be saved in the current Mod directory, e.g. \cstrike. All demo files have a similar name including the given name, date/time and map name:

<name>-<YYMMDDhhmm>-<map>.dem

Re-Playing Recorded Games

The demo file can be played back just like a normal client demo.  You'll need to download the demo onto your own personal computer.  Then type the following command into your console window and load the demo file using the GUI.

playdemo demoname
Example: playdemo match1-06050302-de_dust.dem
or
viewdemo demoname
Example: playdemo match1-06050302-de_dust.dem


What are the Various Commands I can Execute With HLTV?

There is an hltv.cfg file that the following commands can be placed in (in the same directory as the hltv.exe file).  When the server starts up they will be executed. They can also be ran on the HLTV server.


connect <IP:Port>
    connect HLTV proxy to game server (default port 27015)
disconnect
    disconnects proxy from server, but doesn't stop the broadcast. All spectator clients stay connected.
stop [<text>]
    disconnects from server, disconnects all clients and stops demo recording. Optional goodbye message.
quit
    quits the HLTV process
retry
    retries the last server connection
autoretry <0|1>
    if enabled, proxy will retry connection to server if connection was interrupted for any reason
name <text>
    sets the HLTV proxy scoreboard name
hostname <text>
    sets the HLTV host name for game browser list
serverpassword <text>
    sets the game server password
adminpassword <text>
    sets password for RCON & commentator
proxypassword <text>
    sets password for other relay proxies
spectatorpassword <text>
    sets spectator password. Will also exclude proxy from global load balancing.
clients
    lists connected spectator clients
proxies
    lists connected relay proxies
players
    lists players on game server
kick <ID>
    kicks a spectator client from proxy
bann <IP>
    banns an IP address (completely ignored)
clearbanns
    removes all IPs from bann list
say <text>
    sends a text message to game server (chat with players)
msg <text> [<duration> <pos x> <pos y> <color hex rgba>]
    sends a text message to all spectators as big HUD text
localmsg <text> [<duration> <pos x> <pos y> <color hex rgba>]
    same as msg, but only seen by local clients
servercmd <string>
    forwards console command to game server
clientcmd <group> <string>
    forwards a console command to all clients of given group: 1=spectators, 2=proxies, 3=all
loopcmd <id> <n> <string>
    loopcmd will execute <string> every <n> seconds. <id> is a number between 1 and 64 to identify this loopcmd. "loopcmd <id> none" will disable a looping command again. loopcmd without any parameter will list any command currently in the list.
signoncommands <string>
    console commands that will be executed by local spectator clients after connection is established. Commands may be separated by semicolons.
maxclients <n>
    set spectator number limit for this proxy (default 128)
delay <n>
    delays the game stream for n seconds on the Master Proxy. The default value is 30 seconds to avoid cheating. If the delay is set to a value below 10 seconds (e.g. 0), the auto director function will be disabled.
rate <n>
    bandwidth rate the game server sends data to the proxy
updaterate <n>
    game updates per seconds send from server to proxy
maxrate <n>
    sets the maximum bandwidth rate for spectator clients
maxloss <f>
    sets the acceptable packet loss rate, default value is 0.05 (5%). If packet loss is higher, new spectator clients will be rejected.
maxqueries <n>
    maximum of status queries per second requested by server browsers
dispatchmode <0|1|2>
    Dispatch mode 1 (AUTO) will redirect connecting clients to other proxies balancing work load between all proxies. In dispatch mode 2 (ALWAYS) any spectator clients will be redirected, so this proxy serves only as dispatcher. Dispatch mode 0 (OFF) won't redirect any clients.
publicgame <0|1>
    if public is 1, game server IP will be visible to spectators and 'joingame' is allowed.
offlinetext <string>
    info text clients will see as reject reason if HLTV isn't broadcasting yet
chatmode <0|1|2>
    if chatmode is 0, spectators can't chat. If set to 1, only spectators connected to the same proxy can see their chat messages. In chatmode 2 all spectators can chat between each other (then Master and all Relay proxies must have set chatmode 2).
bannerfile <file>
    specifies a TGA file (RGBA) that will be shown as logo in spectator GUI.
ping <host:port>
    pings a HL server on the given port (default 27015)
nomaster <0|1>
    if enabled, proxy won't register at WON master servers
forcemaster <0|1>
    if enabled, proxy will register at WON master server
heartbeat
    sends manually a status packet to WON master servers
region <n>
    set the region your HLTV proxy is located in
rcon <string>
    sends a remote control command to other servers
rconaddress <IP:Port>
    sets the remote control target address
rconpassword <string>
    sets the password for the remote controlled host
cheeringthreshold <f>
    number of cheering players must be above this threshold to play the cheering sound (by default 0.25).
blockvoice <0|1>
    if set, all incoming voice data is blocked. This is useful to override incoming voice commentators or player voice with own commentators voice.
cmdlist
    shows all registered proxy commands
logfile <0|1>
    starts/stops console logging in "logfile<date>.log"
status
    shows proxy status information
modules
    shows all loaded HLTV modules and versions
exec <filename>
    executes a .cfg file
echo <string>
    prints a text to HLTV console
developer <0|1>
    additional debug messages are shown in developer mode
record <filename>
    records all following games to demo files using name
syntax "filename-<date>-<map>.dem"

stoprecording
    stops recording a demo file
playdemo <filename>
    starts broadcasting a demo file


Command Line Variables

-port <n>
    sets the HLTV proxy port that spectators connect to (default 27020)
-ip <IP>
    forces the proxy to use this IP on a multihomed host
-comm <filename>
    sets a master server info file other than woncomm.lst
-nodns
    disables any DNS resolving (useful for LAN proxies)
-maxfps <n>
    sets maximum system cycles per seconds (default 100)
-highpriority
    starts the HLTV proxy as high priority process
-steam
    proxy enables special Steam support
-dev
    developer mode