A CounterStrikeSharp plugin that allows players to hide their legs in first-person view for Counter-Strike 2.
- Toggle leg visibility in first-person view
- Persistent settings - player preferences are saved and restored
- Multiple commands for easy access (
css_hidelegs,css_hideleg,css_legs) - Automatic restoration after spawn and round start
- Safe implementation - only affects first-person view, other players see you normally
- Counter-Strike 2 server
- CounterStrikeSharp (minimum API version 276)
- .NET 8.0 runtime
- Go to the Releases page
- Download the latest
HideLegs-vX.X.X.zipfile - Extract the zip file
- Place
HideLegs.dllin your CounterStrikeSharp plugins folder:csgo/addons/counterstrikesharp/plugins/HideLegs/ - Restart your server or use
css_plugins reload
- Clone this repository
- Follow the Building from Source instructions below
css_hidelegs- Toggle hide legs in first personcss_hideleg- Toggle hide legs in first personcss_legs- Toggle hide legs in first person
- You must be alive and not spectating to use the command
- Settings are automatically saved per player (using SteamID)
The plugin automatically creates a configuration file at:
csgo/addons/counterstrikesharp/configs/plugins/HideLegs/player_settings.json
This file stores individual player preferences and is automatically managed by the plugin.
- .NET 8.0 SDK
- CounterStrikeSharp.API NuGet package
git clone <your-repo-url>
cd HideLegs
dotnet restore
dotnet buildThe compiled HideLegs.dll will be in bin/Debug/net8.0/ or bin/Release/net8.0/
The plugin uses the CS2KZ method by setting the player model's alpha value to 254 (instead of 255) which makes the legs invisible to the player in first-person view while keeping the body visible to other players.
- Alpha transparency: Uses
RenderMode_t.kRenderTransAlphawith alpha value 254 - State management: Tracks player preferences in memory and saves to JSON
- Event handling: Automatically restores settings on player spawn and round start
- Validation: Ensures players are alive and not spectating before applying effects
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- CS2KZ community for the original leg hiding technique
- CounterStrikeSharp team for the excellent API
- Counter-Strike 2 modding community
- Initial release
- Basic leg hiding functionality
- Persistent player settings
- Multiple command aliases
- Automatic state restoration
If you encounter any issues or have suggestions, please:
- Check the Issues page
- Create a new issue with detailed information
- Include server logs if applicable