This program uses Counter-Strike 2's Game State Integration (GSI) to display real-time game data on Discord via Rich Presence. It generates an image with the player's current game statistics and updates the Discord Rich Presence accordingly.
- Displays player game stats (kills, deaths, assists, MVPs, score) on Discord.
- Updates Discord Rich Presence with game mode, map, and team.
- Generates a dynamic image showing game stats for use in Discord Rich Presence.
- Python 3.x
- Flask
- pypresence
- Pillow
-
Clone the repository:
git clone https://github.com/KittleCodes/CS2-RPC.git cd CS2-RPC
-
Install the required packages:
pip install flask pypresence Pillow
-
Update the
CLIENT_ID
variable in the script with your Discord application's client ID. -
Ensure that Counter-Strike 2's Game State Integration is configured to send data to your Flask app. You can do this by adding the
gamestate_integration_cs2rpc.cfg
file in thecsgo/cfg
directory
-
Run the Flask app:
python your_script_name.py
-
Start Counter-Strike 2.
-
The app will update your Discord Rich Presence based on the in-game data received from CS2's Game State Integration.
GET /image
: Returns the generated image showing the player's game stats.POST /
: Receives POST requests from CS2's Game State Integration and updates the Discord Rich Presence.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.