Solved CSGO: Reading the weapon structure.

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Obsta

Jr.Hacker
Meme Tier VIP
Jan 27, 2014
394
2,978
17
So, two questions, how do i find the Current Weapons ID, and what to do with it once i have it.(assuming its the correct one.)

Looking for some guidance with reading CSGOs weapon structure to find the currently equipped weapon.

1.
so far i'm following the method: (old offsets from a old thread)
C++:
RPM >> localplayer + 0x1B88 = wepstruct
RPM >> wepstruct + 0x130 = weaponID (int)
However these are old offsets, which is a dead end to me. I'd like to know what they are actually offsets to.
for example:
C++:
RPM >> localplayer + m_hActiveWeapon  = wepstruct
RPM >> wepstruct + 0x130(?? not sure about this one) = weaponID (int)
2.
If not the above, could anyone at least explain to me what to do with the WeaponID, as far as i can tell you're supposed to cross reference it to a weaponstructure(which i created as a enum).
However the numbers i get for weaponIds are larger numbers, far outside the range of total guns.
example: my enum only goes from 1-~40 where-as the results from the WeaponID pointer lead to like :
 

Obsta

Jr.Hacker
Meme Tier VIP
Jan 27, 2014
394
2,978
17
Solved it,

For anyone coming across this thread in the future:

C++:
HandleToWeapons = BaseEntity + m_hActiveWeapon;
EntityID = HandleToWeapon & 0xFFFF;
temp = Client + entitylist + (EntityID - 1) * 0x10)
WeaponID = temp + m_iWeaponID
Then create an array to compare the returned value against current weaponIDs.
eg: string weaponName = getWeaponString(int WeaponID);

Hopefully explaining it this way will save you from having to work out which offsets go where + learning how to reverse it,

close thread please :)
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
Solved it,

For anyone coming across this thread in the future:

C++:
HandleToWeapons = BaseEntity + m_hActiveWeapon;
EntityID = HandleToWeapon & 0xFFFF;
temp = Client + entitylist + (EntityID - 1) * 0x10)
WeaponID = temp + m_iWeaponID
Then create an array to compare the returned value against current weaponIDs.
eg: string weaponName = getWeaponString(int WeaponID);

Hopefully explaining it this way will save you from having to work out which offsets go where + learning how to reverse it,

close thread please :)
EntityID = HandleToWeapon & 0xFFFF;
what is the & 0xFFFF? Please explaing lol.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods