Skip to content

luizmlo/cpp-AssaultCubeHack-v1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AssaultCube Memory Trainer

A C++ memory manipulation utility for AssaultCube — an open-source first-person shooter. Built with the Windows API for educational and CTF (Capture The Flag) purposes.

⚠️ Disclaimer: This project is for educational use only. Use on single-player or authorized environments only. Do not use on public servers — it violates game terms of service and is unfair to other players.


Features

Feature Description
God Mode Infinite health and armor
Infinite Ammo Unlimited ammunition for all weapons
Rapid Fire Removes weapon cooldown timers
Teleport Instant relocation to preset coordinates
Spin 360° view rotation (demonstration)

Tech Stack

  • Language: C++17
  • Platform: Windows (Win32 API)
  • APIs: FindWindow, OpenProcess, ReadProcessMemory, WriteProcessMemory
  • Build: CMake 3.14+

Project Structure

├── include/assaultcube/    # Headers
│   ├── game_offsets.hpp    # Memory offsets (AssaultCube 1.3)
│   ├── process_manager.hpp # Process attachment logic
│   ├── memory_mapper.hpp   # Address resolution
│   └── hacks.hpp           # Feature implementations
├── src/                    # Implementation
│   ├── main.cpp
│   ├── process_manager.cpp
│   ├── memory_mapper.cpp
│   └── hacks.cpp
├── CMakeLists.txt
└── README.md

Prerequisites

  • Windows (uses Windows.h)
  • CMake 3.14 or newer
  • C++17 compatible compiler (MSVC, MinGW, or Clang)
  • AssaultCube 1.3 installed and running

Build

# Create build directory
cmake -B build

# Build
cmake --build build

# Executable: build/assaultcube_hack.exe

Visual Studio: Open the build folder as a CMake project, or generate a solution:

cmake -B build -G "Visual Studio 17 2022" -A x64

Usage

  1. Launch AssaultCube and join or start a game.
  2. Run the trainer as Administrator (required for process access).
  3. The program attaches to the game, waits 5 seconds, then applies the hacks in a loop.

How It Works

  1. Process Attachment: Uses FindWindow to locate the game window, then OpenProcess to obtain a handle with PROCESS_ALL_ACCESS.
  2. Base Address Resolution: Reads a static pointer (0x509B74) to get the dynamic player entity base address.
  3. Offset Calculation: Adds hardcoded offsets for health, armor, coordinates, ammo, and weapon timers (derived from AssaultCube 1.3 memory layout).
  4. Memory Writes: Uses WriteProcessMemory to modify values in the target process.

Version Compatibility

Memory offsets are specific to AssaultCube 1.3. Different game versions will have different addresses and may not work with this trainer.


License

MIT License — see LICENSE.

About

My first game hack written in c++ using the windows api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published