Untitled

Anonymous
c_cpp
02/08/2026 8:18 PM
2.4 KB
11
Indexable
struct PlayerActor {
    struct Location {
        float x, y, z;
    };
    struct Vitality {
        int Health;
        int Armor;
    };

    struct Name {
        char actorName[16];
    };

    struct WeaponAmmo {
        int16_t     mk77_resAmmo;             // 0x114
        uint8_t     pad_001[0x12];
        int16_t     mtp57_resAmmo;            // 0x128
        uint8_t     pad_002[0x0A];
        int16_t     mk77Dual_resAmmo;         // 0x134
        uint8_t     pad_003[0x6];
        int16_t     mk77_curAmmo;             // 0x13C
        uint8_t     pad_004[0x12];
        int16_t     mtp57_curAmmo;            // 0x150
        uint8_t     pad_005[0x6];
        int16_t     grenade_ammo;             // 0x158
        uint8_t     pad_006[0x2];
        int16_t     mk77Dual_curAmmo;         // 0x15C
    };

    Location location;
    Vitality vitality;
    WeaponAmmo weaponAmmo;
    Name name;
};

//

const uintptr_t localEnt = Memory::Read<uint32_t>(Memory::ExeBase + Offsets::LocalPlayer::Base);
PlayerActor localActor{};
Memory::ReadBytes(localEnt + Offsets::LocalPlayer::Location, &localActor.location, sizeof(PlayerActor::Location));
Memory::ReadBytes(localEnt + Offsets::LocalPlayer::Vitality, &localActor.vitality, sizeof(PlayerActor::Vitality));
Memory::ReadBytes(localEnt + Offsets::LocalPlayer::AmmoInfo, &localActor.weaponAmmo, sizeof(PlayerActor::WeaponAmmo));
Memory::ReadBytes(localEnt + Offsets::LocalPlayer::Name, &localActor.name.actorName, sizeof(PlayerActor::Name));

//

/*
Local player location: (102.000000, 146.000000, 0.000000)
Local player Health | Armor: (100 | 0)
Local player Ammo Info: (mk77 cur: 10 | mk77 res: 50)
(mtp57 cur: 20 | mtp57 res: 40)
(mk77dual cur: 0 | mk77dual res: 0)
Local player Name: FatNigga
*/
Editor is loading...
Leave a Comment