Исходник [External] Get Current Weapon

  • Автор темы Автор темы ufuk361
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
11 Окт 2023
Сообщения
2
Реакции
1
This is my way how I get current weapon from player External.
I hope it helps you.
how to get enemy current weapon string:
Expand Collapse Copy
        auto clippingWeapon = read<std::uint64_t>(pawn + 0x1290); pCSPlayerPawn
        auto weaponData = read<std::uint64_t>(clippingWeapon + 0x360);
        auto weaponNameAddress = read<std::uint64_t>(weaponData + 0xc18);
        std::string weaponName;
        std::string WeaponNameDraw;

        if (!weaponNameAddress) {
            weaponName = "Invalid Weapon Name";
        }
        else {
            char buf[32];
            readsize(weaponNameAddress, buf, sizeof(buf));
            weaponName = std::string(buf);
            WeaponNameDraw = weaponName.substr(7, weaponName.length());
        }
 
This is my way how I get current weapon from player External.
I hope it helps you.
how to get enemy current weapon string:
Expand Collapse Copy
 auto clippingWeapon = read<std::uint64_t>(pawn + 0x1290); pCSPlayerPawn
        auto weaponData = read<std::uint64_t>(clippingWeapon + 0x360);
        auto weaponNameAddress = read<std::uint64_t>(weaponData + 0xc18);
        std::string weaponName;
        std::string WeaponNameDraw;

        if (!weaponNameAddress) {
            weaponName = "Invalid Weapon Name";
        }
        else {
            char buf[32];
            readsize(weaponNameAddress, buf, sizeof(buf));
            weaponName = std::string(buf);
            WeaponNameDraw = weaponName.substr(7, weaponName.length());
        }
how about reading ammo? like current ammo and max clip count
 
Назад
Сверху Снизу