This script disables the flashbang effect in Counter-Strike 2 by continuously setting the flash alpha value to zero.
- Continuously sets
m_flFlashMaxAlpha
to 0 to disable flashbang effects. - Fetches the latest offsets from a remote source.
- Provides real-time logging and feedback.
- Graceful termination with
KeyboardInterrupt
.
- Python 3.7+
pymem
requests
-
Clone the repository or download the script.
git clone https://github.com/Jesewe/cs2-noflash.git cd cs2-noflash
-
Install the required Python libraries.
pip install pymem requests
-
Run the script.
python main.py
- Start Counter-Strike 2.
- Run the
noflash.py
script. - The script will continuously disable the flash effect while the game is running.
- To stop the script, simply close the console window or press
Ctrl+C
.
The script performs the following steps:
- Fetches the latest offsets and client data from a remote source using the
fetch_offsets
function. - Initializes
Pymem
to access the game's memory using theinitialize_pymem
function. - Continuously checks and updates the
m_flFlashMaxAlpha
value to 0 using thenoflash_loop
function, ensuring the flash effect is constantly disabled.
- fetch_offsets: Fetches offsets and client data from a remote JSON source.
- initialize_pymem: Initializes
Pymem
and retrieves the base address ofclient.dll
. - noflash_loop: Continuously sets
m_flFlashMaxAlpha
to 0 to disable the flashbang effect. - main: Orchestrates the flow of the script.
The script uses the logging
module to log important events and errors. The logs include timestamps and error messages, which can be helpful for debugging.
- Ensure that Counter-Strike 2 is running and the window title matches
Counter-Strike 2
. - Make sure you run the script with sufficient permissions to access the game's memory.
- Verify that the offsets are up to date. If the game updates, the offsets might change, and you will need to fetch the latest ones.
This script is for educational purposes only. Using cheats or hacks in online games is against the terms of service of most games and can result in bans or other penalties. Use this script at your own risk.
This project is licensed under the MIT License. See the LICENSE file for details.