Code Monkey home page Code Monkey logo

memory.h's Introduction

Memory.h

The Memory.h class is a toolset for accessing and manipulating game memory, enabling tasks like process identification, module addressing, memory reading, and writing.

To use these functions, consider this example involving the game Assault Cube and its module "ac_client.exe":

// Offsets Example.
constexpr auto localPlayer = 0x17E0A8;
constexpr auto ptrHealth = 0xEC;

// Setup the foundation for your memory manipulation operations.
Memory memory{ "ac_client.exe" };

// Define the ModuleBaseAddress
const auto moduleBase = memory.GetModuleAddress("ac_client.exe");

// Example of how to read and write the health address using local player and an offset to the health value:
const auto localPlayerPtr = memory.Read<std::uintptr_t>(moduleBase + localPlayer);
const auto healthAddress = localPlayerPtr + ptrHealth;

// Example of a simple god mode hack.
const int newHealth = 1337;
memory.Write<int>(healthAddress, newHealth);
ImGui::Text("Health: %d", memory.Read<int>(healthAddress)); // I'm using the ImGui Framework to display the value stored in the health address, but you can use std::cout if you prefer.

For a comprehensive breakdown of each function's purpose and functionality, please refer to my Discord server: https://discord.gg/YuCxC7n9Zm

memory.h's People

Contributors

estkz avatar

Stargazers

 avatar Ancour_ avatar world avatar Pattarapon Koomphon avatar Kyrill Belomenov avatar

Watchers

 avatar  avatar

Forkers

themupp gofrettin

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.