π¬ Getting Entity Weapon ID doesn't work.
Hi! I have loop of players, where I process them. I need to get each player weapon ID, but my code doesn't work ;x
(Getting team id and hp works)
Aaaand my newest offsets:
(ClientDLL = Mem.Module("client.dll")
Yes, I am beginning with coding hacks, I've already made triggerbot and glowing enemies/allies/high value weapons - not copy&paste, just write from 0
If anyone has any helpful idea, it will be very nice to know it
//Addon
i.gyazo.com/fd5535ebe371bb423dd84572279b4c88.png
It gives me these values 10 second after starting 1st round ;x
- - - Updated - - -
Never mind, now works.
(Getting team id and hp works)
Code:
DWORD weaponData = Mem.Read<DWORD>((DWORD)Player.pEntity + m_hActiveWeapon);
int weaponEntityIndex = weaponData &= 0xFFF;
DWORD weaponEntity = Mem.Read<DWORD>(ClientDLL + EntityList + (weaponEntityIndex * 0x10));
int weaponID = Mem.Read<int>(weaponEntity + m_iWeaponID);
int team = Mem.Read<int>((DWORD)Player.pEntity + m_iTeamNum);
int hp = Mem.Read<int>((DWORD)Player.pEntity + m_iHealth);
printf("ID: %d | Team: %d | HP: %d | WeaponID: %d\n", i, team, hp, weaponID);
Aaaand my newest offsets:
Code:
const DWORD EntityList = 0x4A10034; const DWORD m_hActiveWeapon = 0x12C0; const DWORD m_iWeaponID = 0x1684;

Yes, I am beginning with coding hacks, I've already made triggerbot and glowing enemies/allies/high value weapons - not copy&paste, just write from 0

If anyone has any helpful idea, it will be very nice to know it

//Addon
i.gyazo.com/fd5535ebe371bb423dd84572279b4c88.png
It gives me these values 10 second after starting 1st round ;x
- - - Updated - - -
Never mind, now works.
Code:
int weaponIndex = Mem.Read<DWORD>((DWORD)Player.pEntity + m_hActiveWeapon) & 0xFFF;
DWORD weaponEntity = Mem.Read<DWORD>((ClientDLL + EntityList + weaponIndex * 0x10) - 0x10);
int weaponID = Mem.Read<int>(weaponEntity + m_iWeaponID);
int team = Mem.Read<int>((DWORD)Player.pEntity + m_iTeamNum);
int hp = Mem.Read<int>((DWORD)Player.pEntity + m_iHealth);
printf("ID: %d | Team: %d | HP: %d | WeaponID: %d\n", i, team, hp, weaponID);
