Giter VIP home page Giter VIP logo

cs2-noflash's Introduction

Counter-Strike 2 NoFlash Script

This script disables the flashbang effect in Counter-Strike 2 by continuously setting the flash alpha value to zero.

Features

  • 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.

Requirements

  • Python 3.7+
  • pymem
  • requests

Installation

  1. Clone the repository or download the script.

    git clone https://github.com/Jesewe/cs2-noflash.git
    cd cs2-noflash
  2. Install the required Python libraries.

    pip install pymem requests
  3. Run the script.

    python main.py

Usage

  1. Start Counter-Strike 2.
  2. Run the noflash.py script.
  3. The script will continuously disable the flash effect while the game is running.
  4. To stop the script, simply close the console window or press Ctrl+C.

Code Overview

The script performs the following steps:

  1. Fetches the latest offsets and client data from a remote source using the fetch_offsets function.
  2. Initializes Pymem to access the game's memory using the initialize_pymem function.
  3. Continuously checks and updates the m_flFlashMaxAlpha value to 0 using the noflash_loop function, ensuring the flash effect is constantly disabled.

Functions

  • fetch_offsets: Fetches offsets and client data from a remote JSON source.
  • initialize_pymem: Initializes Pymem and retrieves the base address of client.dll.
  • noflash_loop: Continuously sets m_flFlashMaxAlpha to 0 to disable the flashbang effect.
  • main: Orchestrates the flow of the script.

Logging

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.

Troubleshooting

  • 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.

Disclaimer

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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

cs2-noflash's People

Contributors

jesewe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.