❓ Issue with grabbing current weapon ID
I'm writing my first internal hack right now and I'm trying to grab the weapon ID but I'm not getting the desired output. I'm sure I've messed up in more places than one, but all the guides I found that showed how to do this were for external cheats which shouldn't be hard to put into external but I'm a bit dumb, so bear with me.
Any help will be greatly appreciated. If you're really helpful there's $5 in PayPal, Bitcoin, Ethereum, or LiteCoin with your name on it.
Code:
// offsets offsets.dwEntityList = 0x4D07DD4; offsets.dwLocalPlayer = 0xCF5A4C; offsets.m_hActiveWeapon = 0x2EF8; offsets.m_iItemDefinitionIndex = 0x2FAA; // client uintptr_t pLocalPlayer = client + offsets.dwLocalPlayer; uintptr_t pGlowObjectManager = client + offsets.dwGlowObjectManager; uintptr_t pEntityList = client + offsets.dwEntityList;
Code:
DWORD weaponHandle = pLocalPlayer + offsets.m_hActiveWeapon; DWORD entityID = weaponHandle & 0xFFF; DWORD temp = client + pEntityList + (entityID - 1) * 0x10; int weaponID = temp + offsets.m_iItemDefinitionIndex;
