-
Автор темы
- #1
This is my way how I get current weapon from player External.
I hope it helps you.
I hope it helps you.
how to get enemy current weapon string:
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());
}