Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

Client command reference

Dmitriy Bobrovskiy edited this page Sep 1, 2023 · 12 revisions

Menu

Console commands

Command Arguments Comment
+ljump - Issue long jump action to the server, that is +duck|+jump combination
Needs to be bound to a key.
about - Prints information about client library.
customtimer <interval in seconds> [timer number 1|2] This command will start countdown of custom timer from specified second to zero and will emit sound "bell" when timer will reach 0.
There are two undependent custom timers. If timer number isn't specified it is assumed 1.
forcemodel <slot number or player name> [model name] Slot number (can be seen in status command output in first column, range is from 1 to 32.
Model name, if specified, will be used for model replacement on given player. If empty, will reset model replacement.
forcecolors <slot number or player name> [top and bottom colors] Slot number (can be seen in status command output in first column, range is from 1 to 32.
Top and bottom colors, for example "90 30" (could be used without quotes too). If specified, will be used for colors replacement on given player. If empty, will reset colors replacement.
snapshot - If engine_snapshot_hook is 1 this command creates snapshots with customizable names and formats. By default screenshots are placed in /results/year-month/ folder in jpeg format.
cl_messages_dump - Dumps currently registered user messages with their ids and lengths. Mostly needed for developers.
update_check - Checks for new DLL updates.
update_changelog - If an update was found, shows the changelog.

Console variables

General

Variable Values Comment
cl_autowepswitch 0/1 If 1 (default) weapon will automatically switch to picked one if it is more powerful. Requires server-side support.
cl_bunnyhop 0/1 Enable/disable client-side bunnyhop prediction. Remember that this is only prediction, real speed clamping is decided by server.
0 max speed is clamped to 350 to prevent bunnyhop. This is default HL behaviour.
1 (default) max speed is clamped to 2000, thus allowing bunnyhop.
cl_jumptype 0/1 Switch decent jumping when issuing +jump action.
0 default HLDM style. Jump command will be sent to the server immediately, so if it doesn't match the time when the floor is touched you will loose some speed.
1 decent jump (default). You can issue +jump anytime before you fall, jump command will be send to the server when the floor is touched, so you will not loose any speed.
m_input 1/2 Selects mouse input method.
1 (default) mouse movement will be read from Windows cursor movement. This is default HL behavior.
2 mouse movement will be read via DirectInput. This way Windows cursor acceleration feature will not affect mouse input, i.e. mouse acceleration from the system is ALWAYS OFF by this way, but can be turned ON and adjusted by m_customaccel... cvars.
cl_killsound 0/1 Play a sound when you get a kill

HUD

Variable Values Comment
hud_draw 0.0 - 1.0 Now it can accept values from 0 to 1 (i.e. 0.5, etc), this regulates hud transparency.
hud_dim 0/1 Enable (default)/disable dimming of health, armor, ammo and other elements when they are inactive (not changed recently).
hud_color "255 160 0" "R G B" Color of hud elements in RGB format. Used for all elements, but health and armor.
hud_color1 "0 255 0"
hud_color2 "255 160 0"
hud_color3 "255 96 0"
"R G B" Colors of health and armor in RGB format.
hud_color1 used for value >= 90, hud_color2 for 50 <= value < 90 and hud_color3 for 25 < value < 50.
Also hud_color3 is used for armor value <= 25. Health for values <= 25 draws in red (can't be changed via cvars).
hud_colortext 0/1/2 Configure color codes processing in hud, chat, death list, spectator panel, scoreboard, status bar.
0 turn off color codes processing.
1 (default) colorize text acording to color codes in chat, death list, status bar and remove color codes in hud, spectator panel, scoreboard.
2 remove color codes, but do not colorize text.
hud_shownextmapinscore 0/1 Controls whether or not to show nextmap in VGUI1 scoreboard table. Default on.
hud_showlossinscore 0/1 Controls whether or not to show loss in VGUI1 scoreboard table. Default on.
hud_showsteamidinscore 0/1 Controls whether or not to show SteamIDs in VGUI1 scoreboard table. Default on.
hud_nextmap 0/1/2 Enable/disable nextmap show in the hud on the map end.
0 turn off nextmap show in hud.
1 show nextmap for about 30 seconds starting from 60 till the end.
2 show nextmap last 60 seconds of the map.
hud_timer 0/1/2/3 Enable/disable show of timer in hud.
Timer has three modes:
0 will turn timer off,
1 will show time left on current map,
2 will show time passed on current map,
3 will show your PC local time.
Timer will get map time limit directly from server rules, so it will work on most servers.
It will not work on some servers where paranoid admins removed server rules.
Also it will not display left time if there is no time limit on server.
hud_weapon 0/1 Enable/disable displaying sprite of currently selected weapon. Default off.
hud_speedometer 0/1 Enable/disable the speedometer.
hud_saytext_oldpos 0/1 Moves chat back to the top of the screen.

Player models

Variable Values Comment
cl_forceemenymodels "model1;
model2..."
List of models for replacing enemy models.
If you don't like various custom player models that servers likes to upload you can use cl_forceemenymodels "zombie;scientist;robo;recon;hgrunt;helmet;gordon;gman;gina;barney" to force using of default model.
cl_forceemenycolors "color1 color2"
E.g. "90 30"
Top and bottom colors for enemy colors replacing.
cl_forceteammatesmodel "model1;
model2..."
List of models for replacing teammates models.
cl_forceteammatescolors "color1 color2" Top and bottom colors for teammates colors replacing.

Snapshots and game results

Variable Values Comment
engine_snapshot_hook 0/1 Enable/disable intercepting of "snapshot" command and perfom custom processing (saving to jpeg format and with custom names). Default on.
snapshot_jpeg 0/1 Enable/disable saving screenshots to jpeg format.
If 1 will save as jpeg, if 0 will save as bmp. Custom naming rules still apply to bmp screenshots.
Requires engine_snapshot_hook 1 to work.
snapshot_jpeg_quality 1-100 Quality of jpeg compression. Changes size and quality of a picture. On 95 image almost the same as bmp, but takes 10 times less space.
results_file_format Format string This string is used to construct results file name. It is used currently for screenshots.
You can specify subfolders (under mod directory) via adding "" symbol.
Format string for C++ function strftime with addition of %l for level name. You can see description of format on http://www.cplusplus.com/reference/clibrary/ctime/strftime/.
Default: "results%Y-%m%l-%Y%m%d-%H%M%S"
results_counter_format Format string for sprintf It is used to construct unique results file name when there is alredy file with such name exists.
This conuter is added to file name.
Actually you can/need only variate splitter symbols and counter width.
Default: "-%03d"
results_demo_autorecord 0/1 Enable/disable automatic recording of the demo after joining a server. Demo recording is automatically restarted after a map change. Default off.
results_demo_keepdays number Days to keep automatically recorded demos. They are listed in tempdemolist.txt file in the mod folder (valve or valve_language) and purged on game start. You can manually remove demos from the tempdemolist.txt file to prevent automatic deletion. Default: 14
results_log_chat 0/1 Enable/disable chat logging into a file. Default off.
results_log_other 0/1 Enable/disable other messages (like kill messages and others in the console) logging into a file. Default off.

VGUI2

These settings are only available on VGUI2 builds

Variable Values Comment
cl_enable_html_motd 0/1 Whether or not servers can send HTML MOTD to the client.

VGUI2 Scoreboard

Variable Values Comment
hud_scoreboard_mousebtn 0/1/2 Selects mouse button that shows the cursor.
0: none
1: MOUSE1 (default)
2: MOUSE2
hud_scoreboard_showavatars 0/1 Shows/hides avatars in the scoreboard.
hud_scoreboard_showsteamid 0/1 Shows/hides SteamIDs in the scoreboard.
hud_scoreboard_showeff 0/1 Shows/hides efficiency in the scoreboard.
hud_scoreboard_effpercent 0/1 Sets whether or not efficiency will be displayed in percents
hud_scoreboard_efftype 0/1 Selects efficiency calculation formula.
0: Kills / Deaths
1: Kills / (Deaths + 1) (default)
hud_scoreboard_effsort 0/1 Enables/disables sorting by efficiency. Can be cahnged in the scoreboard panel when mouse is active.
hud_scoreboard_showloss 0/1 Shows/hides loss value in the scoreboard.
hud_scoreboard_size 0/1/2 Changes how tall should scoreboard rows be.
0: automatic based on whether or not all players can fit on the screen. (default).
1: always large.
2: always compact.
hud_scoreboard_spacing_normal 0/pixels Height of rows for normal (large) mode.
hud_scoreboard_spacing_compact 0/pixels Height of rows for comapct mode.

VGUI2 Chatbox

Variable Values Comment
hud_saytext_time seconds How long should new chat messages stay on the screen.
cl_mute_all_comms 0/1 If 1, voice-muted players will also be muted in the chat.
hud_saytext_oldchat 0/1 If 1, disables VGUI2 chatbox and enabled stock chat.

Custom crosshair

Variable Values Comment
cl_crosshair_custom 0/1 Use custom crosshair insted of default sprite one.
cl_crosshair_red 0-255 Red component of crosshair color.
cl_crosshair_green 0-255 Green component of crosshair color.
cl_crosshair_blue 0-255 Blue component of crosshair color.
cl_crosshair_gap pixels Gap between lines.
cl_crosshair_size pixels Length of the lines.
cl_crosshair_thickness pixels Width of the lines.
cl_crosshair_outline_thickness pixels Thickness of the outline.
cl_crosshair_dot 0/1 Whether or not show a dot in the middle.
cl_crosshair_t 0/1 If 1, changes crosshair from + to T.

Misc

Variable Values Comment
engine_fix_fpsbug 0/1 Enable/disable fix of FPS bug in the engine. This will fix moving slowdown on certain FPS values. Default on.
cl_messages_log 0/1 If 1 client will log user messages in console when it will receive them from server. Mostly needed for developers.
con_say_color "R G B" Color for say messages displayed in console in RGB format. Default: "30 230 50"
aghl_version version string Contains client library fersion in format MAJOR.MINOR.PATCH+COMMIT+M (e.g. 1.1.38+4b1409c+m or 1.1+6964bb6 (for releases)). Queryed by the server.
aghl_supports unsigned int Contains bitfield of supported features by the client. Queryed by the server. See bugfixedapi/IBugfixedServer.h for details.
cl_check_for_updates 0/1 Whether or not the client should automatically check for updates.