How To Turn On Xray In Csgo Demo

Counter-Strike: Global Offensive (CS:GO) demos are valuable tools for analyzing gameplay, reviewing strategies, and creating content. A key feature in demo playback is the ability to view players through walls using X-ray vision, allowing for a comprehensive understanding of player positions and movements. This article provides a detailed guide on how to activate X-ray in CS:GO demos.
Method 1: Using the Demo Playback UI
The most straightforward way to enable X-ray is through the built-in demo playback user interface. This method is suitable for most users and requires no console commands.
Step 1: Launch CS:GO and Access the Demo Playback
Start by launching Counter-Strike: Global Offensive. Once in the main menu, locate the "Watch" tab. This tab is dedicated to viewing past matches and downloaded demos.
Must Read
Step 2: Load the Desired Demo
Within the "Watch" tab, you'll find options to view your own matches, downloaded matches, and tournaments. To watch a specific demo file, click the "Your Matches" button. This will open a list of available demos. Select the demo you want to analyze and click "Watch." Alternatively, if the demo file isn't listed, you can place the .dem file in your CS:GO folder (usually located in C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo) and type playdemo [demo_filename] in the console.
Step 3: Locate and Activate the X-Ray Option
Once the demo begins playing, you'll see the demo playback UI at the bottom of the screen. This UI includes controls for play/pause, fast forward, rewind, and other options. Look for an icon that resembles an eye or a player silhouette. Hovering over the icons will usually display their function. The X-ray option is typically represented by an icon suggesting vision through walls. Click this icon to toggle X-ray vision on or off. With X-ray activated, you'll be able to see the outlines of players, even through walls and other obstacles.
Method 2: Using Console Commands
For more advanced users or those who prefer a command-line interface, X-ray can be enabled and controlled through console commands. This method offers greater flexibility and allows for scripting and automation.
Step 1: Enable the Developer Console
Before using console commands, ensure that the developer console is enabled in CS:GO. Navigate to "Settings" -> "Game Settings" and find the "Enable Developer Console (~)" option. Set this option to "Yes." The console can then be accessed in-game by pressing the tilde (~) key.

Step 2: Open the Console and Enter the X-Ray Command
Once the developer console is enabled, open it by pressing the tilde (~) key. Then, enter the following command to enable X-ray:
thirdperson
This command activates third-person view, but it’s a stepping stone towards enabling X-ray. Afterward, use the following command:
sv_cheats 1
This command enables cheat commands, which are necessary for certain X-ray functionalities. Warning: Enabling sv_cheats 1 only works in demo playback or private servers where you have administrative privileges. Attempting to use this command in a public match will not work and may result in penalties.
Step 3: Activate the X-Ray View
With sv_cheats 1 enabled, you can now use the primary X-ray command:

r_drawothermodels 2
This command draws all player models, even those behind walls, in X-ray mode. To disable X-ray, use the command:
r_drawothermodels 1
This command reverts the player models to their normal rendering state.
Additional Console Commands for Demo Playback
Several other console commands can enhance your demo viewing experience:
host_timescale [value]: Adjusts the playback speed of the demo. A value of 1 is normal speed, 0.5 is half speed, and 2 is double speed.demo_goto [tick]: Jumps to a specific tick in the demo. Ticks are units of time within the demo file.demo_pause: Pauses the demo playback.demo_resume: Resumes the demo playback.spec_player [player_name or player_number]: Allows you to spectate a specific player. Use the player's name or their numerical ID.
Troubleshooting
If you encounter issues enabling X-ray, consider the following troubleshooting steps:

- Verify Demo File Integrity: Ensure that the demo file is not corrupted. Corrupted demo files may not play correctly or allow X-ray to be enabled.
- Check Command Syntax: Double-check the syntax of the console commands. Typos can prevent the commands from working correctly.
- Ensure sv_cheats is Enabled: Remember that
sv_cheats 1must be enabled before usingr_drawothermodels 2. - Restart CS:GO: Sometimes, restarting CS:GO can resolve minor issues preventing X-ray from working.
- Update Graphics Drivers: Outdated graphics drivers can cause rendering problems. Ensure that your graphics drivers are up to date.
Customization
While the basic X-ray functionality is provided by the commands mentioned above, you can further customize the appearance of the X-ray view using additional console commands. For instance, you can adjust the color and transparency of the player outlines.
mat_wireframe 1
This command applies a wireframe overlay to all models, making the X-ray effect more pronounced. To revert to the default X-ray look:
mat_wireframe 0
Experiment with different values to achieve your desired visual effect.
Alternative X-Ray Methods
Beyond the standard methods, some third-party tools and plugins offer enhanced X-ray functionalities. These tools may provide features such as custom player highlighting, team-specific X-ray colors, and more advanced analysis capabilities. However, using third-party tools can sometimes be risky, as they may violate CS:GO's terms of service or introduce security vulnerabilities. Always exercise caution and ensure that any third-party tool you use is from a trusted source.

One common alternative is to use external demo analysis software. These tools often have built-in X-ray features and offer a more user-friendly interface than the console. However, these programs may require a subscription or a one-time purchase.
Another alternative involves custom scripting. Advanced users can create custom scripts (using .cfg files) that automatically execute a series of console commands when a demo is loaded. This allows for a fully automated X-ray setup.
Remember to consult the Counter-Strike: Global Offensive community forums and online resources for the latest information on available tools and methods.
Conclusion
Enabling X-ray in CS:GO demos is a valuable skill for anyone looking to improve their game, analyze professional matches, or create engaging content. Whether you prefer the simplicity of the demo playback UI or the power of console commands, understanding how to activate X-ray unlocks a new level of insight into the game. Mastering these techniques allows players to dissect strategies, identify mistakes, and ultimately, enhance their understanding and enjoyment of CS:GO.
