Half-Life 2: Deathmatch – How to debug maps & commands

Half-Life 2: Deathmatch – How to debug maps & commands 1 - steamlists.com
Half-Life 2: Deathmatch – How to debug maps & commands 1 - steamlists.com

This guide is about (Half-Life 2: Deathmatch – How to debug maps & commands)

When I test and debug maps, I frequently use these commands. These are the most frequently used console commands I use for debugging, testing, and exploring Half-Life 2 Deathmatch maps, so you can use this guide if you’re stuck or want to have some fun with maps.
Every command that might be helpful is not covered in this manual. The ones I use most frequently are covered, though.

Content Guide


  • Wiki
  • General Commands
  • Mods Installation
  • Console errors


If you want to see all console commands, I recommend looking at the
VDC’s list HL2 Console Commands instead of [valvesoftware.com]

. The in-game console commands Find command And Help command are also very useful.

Accessing Missing/Hidden Commands

Many useful console commands can be found in HL2DM’s game engine. However, they are not normally accessible due to unknown reasons.

You cannot change the gravity setting to match a server’s physics setting.

This can be avoided by installing SourceMod and starting the game with a special launch option.

Installing SourceMod

These instructions are nearly the same whether you’re installing SourceMod on a server or client.

1. First download
MetaMod – Sourcemm.net

Move the files from the downloaded file to another location. “steamapps\common\Half-Life 2 Deathmatch\hl2mp” . The addons Folder should be the only item new within hl2mp.

2. Next, download
SourceMod – Sourcemod.net

Click-drag both folders again “steamapps\common\Half-Life 2 Deathmatch\hl2mp” .

SourceMod Launching the Game

1. Open Steam and open your Library.

2. Find Half-Life 2: Deathmatch

Click the gear to the right , and in the new menu, click Properties.

3. Launch Options should be your next line. This line should be added to it (. You don’t need to remove anything): Launch Options

This disables VAC and allows loading plugins such as SourceMod from the “Half-Life 2 Deathmatch\hl2mp\addons” folder.

Check if SourceMod works!

1. Launch HL2:DM.

2. Either Create Server or open console in the UI. Click the tab), above tab), and type map dm_lockdown into the console text box. Press Enter.

3. Type the following: Press the say key A (y or u default) !sm_cvar sv_friction 0 .

Disable SourceMod

1. Open Steam and open your Library.

2. Find Half-Life 2: Deathmatch

Click the gear to the right , and in the new menu, click Properties.

3. Launch Options should be replaced. There, remove -insecure.

Common Console Errors

You might encounter a lot of errors when you use the developer console.

Hosting servers using custom server binaries can fix many of these issues.
Plugins – [github.com]

However, they aren’t fixed when maps loaded on your machine are loaded; this is known as using a
listen server – [wikipedia.org]


The number one rule in HL2DM mapping is never to give the listen to server your trust.

Playing sequence

Sound errors cause this bug.

This is the only way to fix it, other than filtering out all console spam.

con_filter_enable 1 // 1 filters out completely, 2 displays filtered text brighter Def. 0
con_filter_text_out "Playing sequence" // Prevents annoying console spam involving sound Def. ""


The unreasonable position from vphysics is ignored!

This means that something has fallen through a map’s floor and will continue to fall until the map is redrawn.

This bug is usually caused by prop respawning or an item being too close to the ground.

This issue is usually solved by placing entities 16 units higher than the floor from its bounding box.

DataTable warning: Player: Out-of-range value in SendPropFloat “m_flPlaybackRate”; clamping

This indicates that an object has reached the maximum speed allowed by the command sv_maxvelocity default 3500 – and is being deliberately slowed down by the game engine.

This is usually caused by players who run fast from map elements such as jump pads or wind tunnels.

This error is rare and can be ignored.

Bad SetLocalAngles for [targetname]

This is a bug in func_rotating – [valvesoftware.com]

This is when a map has been open for a very lengthy time.

You can either restart your map or, if you’re the master mapper, fix it by sending a logic_relay restarting your rotation.

General Commands

These commands are almost always used.


1 is used to disable people from joining your listen server (nondedicated server)), unless they are on your LAN. Highly recommended!

0 allows people to join your game and lists your game on (‘s game list).

Map mapname

This named map can be loaded.

Map search: maps string will list all maps that contain the string (text inside it, while an (asterisk as maps * A) will list all maps you have scattered around the hl2mp directory.


1 toenable Cheat commands to be run

0 through disable in this setting

Notice: Commands entered before sv_cheats enabled will be activated.


Toggle player collision off and on

Not to be touched: Triggers will still be activated

Impulse 101

Instantly can obtain all standard weapons and extra ammo. To get maximum ammo for any weapon, activate this command three times.


Toggle pseudo Godmode on and off. You can take damage but you are effectively invulnerable, with a few exceptions.

This is a workaround for godmode (god not working with this version of Source Engine.


2 allows you to print game actions to your console and the top-left portion of your HUD.

0 is required to disable this setting.


Quick Tips


  • Hammer allows you to press Disable SmartEdit within an object’s properties to access an engine property as its outputname.
  • To modify an object’s flags in game , you will need to add together the total number. To find these values, you will need a custom FGD or you can search the entity’s name on VDC.
  • If a target isn’t named, its name is instead the entity classname
  • !picker targets an entity in your crosshair. This includes invisible objects like triggers
  • !player targets you and other connected players (often)


ent_fire targetname addoutput “outputname value

You can change the properties of an entity.

The double quotes in Hammer are recommended. This is to prevent numbers being read as a delay to the engine (. If not inputted), it assumes that the action is instant (0).


Toggle – Information about the entity closest to the crosshair.

Developer 1 or higher is required


Toggles The visibility of trigger brushes on- and off.

Notable: There is a command with the same name, showtriggers int, but it is not functional.

ent_bbox targetname

Show the bounding box around an item. If targetname has not been provided, it will target !picker instead.

Developer 1 or higher is required

ent_fire !picker kill

Until map restart, Remove the targetted entity from this game


1 depicts the ladders position. It’s ladder type (redundant with HL2:DM). It’s dismount points are (and use key entry/exit positions in).

0 reverts to this setting

To make changes to the command’s settings, you will need to do a map change or a map restart.

False Ladders

A ladder that is difficult to use or appears to be more efficient than standard ladders can likely be made from lots of clip brushes.

These are clip ladders. To see and test them, you’ll need r_drawclipbrushes.

ent_create npc_alyx

Spawn Alyx in your crosshair. This is the fastest way to spawn something that matches a player’s dimensions.


These are great for co-op maps.


Toggle A AI thinking () actions on and off. [May leave a message to the HUD if disabled.]

ent_fire ai_network “kill”

Until map reset Disable anything involving AI


Toggle AI is able to react and respond to the player unless they are shot or reacted before the command was enabled.

World Visibility

This hides visual elements that may make debugging a little easier.


0 To hide all prop_static

2 shows static wireframes for visibility testing.

1 is to revert to this setting, making static props regular again


0 is to hide all displacement (, not flat) brushes

1 To revert this setting, making displacements again visible


0 To hide all (textures that don’t have to be tied to brushes

2 for full texture area

1 To revert to this setting, view decals normally again


This is typically level geometry, but it can also include gameplay elements such as clip brushes.


1 for all clip brushes (invisible walls,) and hollow geometry (wireframes through walls.

2 is the address for all clip brushes that are solid but not through walls.

0 to reverse this setting, hide all clip brushes as normal again

Clip Brush Color Key


  • Red – Clip all [VPhysics objects such as grenades are probably an exception, since they have their own way of blocking things]
  • Pink – Clip Player only
  • Purple – NPC Clip only



0 To hide func_detail (compiling optimization brushes)

1 To revert this setting, make func_detail again


2 for brush entities (such func_door A) as wireframes.

0 To hide brush entities

1 is to revert these settings, restoring visibility of brush entity


0 is used to hide translucent A14Y see-through; this name is often confused transparent A17Y objects such as brushes or decals

1 is to revert the setting, returning general visibility


3 To draw all visleafs in wireframes, which are useful for map optimization

0 is to reverse this setting, hiding wireframes from this command.

Map Lighting

These commands debug lighting after compilation. To get an approximate idea of how a map will look in Hammer++ (highly recommend), use the 3D Lighting View It’s a lifesaver!


1 To make the visuals of this map brighter in solid white, as if it were fully lit. If there are no light entities on a map that can generate lighting, the game will automatically enter this command.

0 is the code to disable this setting. Instead, use the map’s compiled light instead. Maps will not be lit in black.


1 is a way to see the positions of all lights from compile. Flash lights seem to be unaffected.


1 To visualize how ambient lighting (from an) light_environment affects the visleaf that you are standing in, white cubes show what and how it is affected

To disable this setting, hide the cubes, enter 0

This command requires mat_leafvis 1. developer 1 is highly recommended.

Sounds & Soundscapes

Quick Tips


  • HL2:DM supports sounds only in.wav or.mp3 formats. There are other limitations too (M3 can’t loop with Hammer I/O and there are other limits too [Frequency below 44hz I believe?]
  • To fix a custom sound that doesn’t work, you might need to delete multiple sound.cache file(close the game if it is open and search & delete them all)).
  • developer2 will display the soundscape name at the top-left corner of the screen and console, when triggered



Instantly stop of all played sounds on a game map; this can cause the game crash under certain conditions.

Play soundpath\soundname.filetype

Instantly plays an unmodified sound effect at maximum volume within the current soundscape.

Important Note on Sound Pathing

The file path reads the directory sound and treats all file paths like they were created and packed from that directory.

The engine effectively merges all sound files from both hl2 & hl2mp directories, all custom folders inside hl2mp/custom/directory_names_here/sound, and the sound folder inside the map’s BSP as one giant cross-referenced sound folder.

Example play Command

play weapons\stunstick\spark1.wav


playsoundscape soundscape.soundscape_name

Forcing the soundscape to change and the environmental DSP effect (to e.g. Echo) to the current soundscape until another soundscape is activated.

Here is a list of all vanilla HL2DM soundscapes
You can find the VDC article here – [valvesoftware.com]


Stats for players

These commands target the player that you control, but some commands will target all servers.

Quick Notes


  • The !player 24-A17404293A is usually the way to target yourself. However, sometimes you will need to remove (from player to get a command for work.



Toggle player collision off and on

Not to be touched: Triggers will still be activated


Toggle pseudo Godmode on and off. You can take damage but you are effectively invulnerable, with a few exceptions.

This is a workaround for godmode (god not working with this version of Source Engine.

Impulse 101

Instantly can obtain all standard weapons and extra ammo. To get maximum ammo for any weapon, activate this command three times.

Impulse 81

Instantly and weapon_cubemap are two additional invetory items. This hidden weapon is used to debug reflections (cubemaps,), and also for Custom Guns server plugin.

It spawns in weapon slots 3 (slot3 command), the exact same weapon slot as the SMG or AR2. This command is for directly equipping it.

bind key "use weapon_cubemap"


ent_fire !player addoutput “health x

Instantly gives all players x good health; x is any number including decimal places (programmers call this 23A1740710A A)

This is useful when you need to test large amounts of damage and have a large number to base the math.


Instantly Switch to a view behind a player, which is useful in player visibility testing (e.g. lighting) or previewing shadows cast by players.


Instantly will revert to the default first-person perspective.

Physics Commands

These commands not only affect player movement but also affect other entities.


The pull of gravity, which affects all players as well as all physics objects. Instead of pushing objects to the ceiling, negative values push them to the ceiling.

300 represents low gravity; it all depends on the server you’re emulating

600 HL2:DM is the default

sm_cvar sv_airaccelerate

How fast and far a player can turn quickly using air strafing (Looking and strafing in the same direction in midair). Higher values allow for tighter, faster turning.

Common Air Accelerate Values

150 – Most common surf mode setting across all Source engines

100 – The old, bugged, HL2DM default air acceleration setting [Likely before the 2010 update, where this setting was also changed but it did nothing to the game. According to TheNewGuy I was a DM fetus during that time before moving on to other games.

15 – XDM setting [TDK server uses 16]

10 – HL2:DM default

sm_cvar sv_friction

The strength of the world friction, how rigid or smooth it is to move about. Lower values enable more crouching and/or bunnyhopping, while high values can stop it dead in its tracks.

All objects and players are affected by the friction command.

Common Friction Values

8 – Garry’s Mod friction (incredibly rigid)

3 – (XDM movement (faster & easier bunnyhopping

0 –Outright remove friction [ice physics?]

4 – default ground friction HL2:DM

sm_cvar sv_accelerate

How fast a player can reach ground speed and how easy it’s to jiggle peek (ADAD strafing corners)

[Higher values seem to make forward/backward, left/right strafing and left/right strafing appear more rectangular if the keys are consequentially pressed into a circle shape. But I’m not sure whether this is a placebo or not.

11 – XDM ground acceleration (easier to bunnyhop with, especially when using sprint)

10 – default ground acceleration HL2:DM

Misc. Commands

Commands that don’t fit anywhere else


You can run the game at speeds between 0 and 10 times normal. This allows you to test item respawns and skip waiting for timed events quickly.

If you need things to move slowly, you can use decimals (floats A).

10 can be your fastest route

0.064 represents approximately 1 game tick per second at 64 tick default [Needs to be verified].]

1 for a return to normal speed


Take the angles and coordinates you are currently looking at, and export them to the console. This line can be copied and pasted to return to it later quickly.

setpos x y z

Instantly Move to these coordinates (z Is height, and is optional)

setang pitch roll yaw

Instantly Look in this direction.

Angle Directions

Pitch – Up/Down +-90deg

Yaw – Right/Right 0-360 (supports positive numbers, e.g. -90deg is also +270deg in)

Roll – Diangular Camera Tilt, +-60deg. Optional, and good for taking screenshots.


1 displays current velocity, angle, and position at the top-right corner of the HUD

0 – to hide it again

Note: This cheat is protected in other Source Engine Games (CS.GO and possibly TF2 – but not HL2DM.


1 Show framerate, with the current map’s name in the top right of HUD in green

0 – to hide it again

Screenshot Commands

Commands that can be used to take great screenshots.

Quick Tips


  • Only the Steam overlay can capture modified Gamma settings. This is only possible while the game’s fullscreen.



0 is used to hide the in-game HUD

1 is to restore the HUD to its normal state

Notable: hidehud 4 also achieves this [It has a bit less flexibility, too].


Instantly Reload all UI elements. This is useful for fixing stuck HUD elements like frozen panels.


0 is to conceal the held weapon

1 to display it again

Notable: impulse 200 is also possible, but it has some quirks, so the above method is preferred.


0 hides text from server plugins (mostly things like a map’s left time or scoring information)).

1 to allow the same thing again

Note: You don’t have to use any server plugins besides SourceMod.

Server Hosting

These are meta-server settings that affect the way a server works.

Quick tips


  • When you load a map from your machine, the HL2DM game client starts a listener server.
  • I strongly recommend using Source Dedicated Server to allow people to join a game hosted on your HL2DM client. This is a more stable way to load maps correctly with additional fixes for your game(e.g., fewer VPhysics issues), and you have the added flexibility to set up plugins with SourceMod.
  • Source Dedicated Server in Steam Library is horribly out of date. You’ll need SteamCMD from [valvesoftware.com]

    To retrieve the files required to host a dedicated HL2:DM server.



1 is used to disable people from joining your listen server non-dedicated) server (, unless they are on your LAN. Highly recommended!

0 allows people to join your game and lists your game on (‘s game list).

sv_password password

You can set a password to prevent random people from joining your online game if you want to allow them to.


This command determines whether a map can use the point_servercommand entity if it is used on them.

point_servercommand can be used to execute server commands on your server.

This is usually used positively, such as setting up nonstandard game modes like CTF or relaying server chat events (to the client. Maps that use TheNewGuy’s holographic prefabs send texts events for item respawn and text alerts) or just Easter Eggs.

Server commands can be used maliciously to passwordize a public server.


If placed on a map, always will allow maps to use point_servercommand

disallow will block maps using point_servercommand. This will prevent potential server exploits from malicious mapping but could also break some legitimate ones.

Launch Commands

Quick tips


  • Any console command can be used to launch a command if it is started with a (plus “+command”)


+map mapname

Skip the main menu, and This map can be instantly loaded on your listen server.


Load without Valve Anti–Cheat (VAC) and allows loading plugins directly from the addons directory. Hidden server commands can be used with SourceMod. This is only possible if you are using Source Dedicated Server to load maps.


If HL2DM (hl2.exe) is already opened, you can apply as many launch commands to the already open game as you like.

This is helpful if you need to recompile and test the map in Hammer quickly.

-tickrate X

You can change how often the game server refreshes its calculations/actions per second. (is generally smoother than), but there are some caveats.

  • Certain tickrates are problematic in the game, particularly those above 100.
  • Glitches are more common and more severe when there is a higher tickrate. Usually, they involve physics.
  • For players to take advantage the increased tickrate, you may need to force rates through server variables.

Notable tickrates

  • 100 tick – Smoother gameplay with fewer glitches When used with game fixes, the highest recommended tickrate.
  • 128 tick – Prefer tickrate for competitive play with other Source engine games
  • 64 tick – HL2:DM default tickrate




Written by CLANG-CLANG

Hope you enjoy the Guide about Half-Life 2: Deathmatch – How to debug maps & commands, if you think we should add extra information or forget something, please let us know via comment below, and we will do our best to fix or update as soon as possible!

Be the first to comment

Leave a Reply

Your email address will not be published.