CS2 X-Ray Guide 2025 – Unlock Wallhack View in Demo & Practice
How to Enable X-Ray in CS2: Commands for Demo and Practice Mode

If you’ve ever watched a professional CS2 match or a highlight video, you’ve probably seen the “X-Ray” effect — enemies glowing through walls so you can follow their positions even when they’re hidden. This feature is known as X-Ray, and it’s commonly used in broadcasts, demos, and training sessions. But how do you enable it yourself? The process depends on whether you’re in a practice match or reviewing a demo. Let’s go through both.
"0.1. X-Ray in Practice Mode","0.2. How to Enable X-Ray in Demo Review","0.3. Useful Practice Commands","0.4. How to Save Your Commands in a Config File","0.5. What the Community Thinks","0.6. Final Thoughts"
X-Ray in Practice Mode
When you’re warming up, testing grenade lineups, or practicing strategies, X-Ray can help you understand positions and timings more effectively. However, before you can use it, you need to allow cheat commands — otherwise, X-Ray won’t work.
First, open the developer console and enable cheats by typing sv_cheats 1. This unlocks commands that are usually disabled in normal matches. Once cheats are active, turn on X-Ray by typing r_drawothermodels 2. This command makes all player models visible through walls, allowing you to track enemies or bots no matter where they are on the map.
If you want to disable the effect and return to normal visibility, type r_drawothermodels 1. And once you’re done with your training, it’s good practice to turn cheats off again by typing sv_cheats 0.
Keep in mind that all of these commands work only in offline sessions, custom servers, or private lobbies. They cannot be used in official matchmaking.
How to Enable X-Ray in Demo Review
Demos are a different story — here, console commands don’t control X-Ray. Instead, the function is built into the demo playback tools. To access them, press Shift + F2 to open the demo panel. Once it’s open, you can toggle X-Ray visibility simply by pressing Q on your keyboard.
Other useful controls include pressing the spacebar to pause or resume playback and using the number keys (1, 2, 3, etc.) to change the playback speed. There’s no need for commands like r_drawothermodels here — everything is managed directly through the demo interface.
Useful Practice Commands
Since you’re already enabling cheats for X-Ray, it makes sense to use other useful commands to improve your training. Here are some of the most commonly used ones:
Type sv_infinite_ammo 1 to get unlimited ammunition without needing to reload.
Use mp_buy_anywhere 1 to allow weapon purchases from anywhere on the map.
Enter sv_showimpacts 1 to show bullet impact markers and analyze shooting accuracy.
Enable sv_grenade_trajectory 1 to visualize grenade paths, which is essential for perfecting lineups.
Use bot_kick to remove all bots if you want to practice alone.
Set mp_roundtime 60 to increase the round duration to 60 minutes, giving you more time to experiment.
How to Save Your Commands in a Config File
Entering all these commands manually every time is inconvenient, so most players create a configuration file. To do this, open Notepad and write down all your commands — for example: sv_cheats 1, r_drawothermodels 2, sv_infinite_ammo 1, mp_buy_anywhere 1, sv_grenade_trajectory 1, and so on. Save this file as “practice.cfg” in your CS2 config folder. Then, when you launch the game, open the console and type exec practice.cfg to instantly load all your training settings, including X-Ray.
What the Community Thinks
Players have different opinions about X-Ray. Some view it as a fun, “legal wallhack” that helps them understand the game better, while others only use it for demo analysis. Professional players often combine X-Ray with other commands like impact markers and grenade trajectories to get the most out of their training sessions.
Real CS2 Inventory Value – How to Check in 2025
Final Thoughts
Here’s a quick summary: in practice mode, type sv_cheats 1 and then r_drawothermodels 2 to enable X-Ray. To disable it, use r_drawothermodels 1 and finally sv_cheats 0. In demo review, there’s no need for commands — simply press Shift + F2 to open the demo panel and toggle X-Ray with Q.
Knowing how to control the X-Ray feature is essential for improving your gameplay. Whether you’re analyzing mistakes, practicing grenade lineups, or breaking down strategies, using X-Ray properly will make your training sessions more productive and your understanding of CS2 much deeper.