Raised This Month: $2 Target: $400
 0% 

Solved [TF2]How can i get Equip Reigons Name With EntIndex?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ABCDEFGH23
New Member
Join Date: Jun 2020
Location: HEEELP!!!
Old 06-27-2020 , 02:31   [TF2]How can i get Equip Reigons Name With EntIndex?
Reply With Quote #1

EX:
hat
arms, feet
head_skin
necklace
glasses
back
scout_shirt
.
.
.

Last edited by ABCDEFGH23; 07-02-2020 at 06:23.
ABCDEFGH23 is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 06-27-2020 , 10:44   Re: [TF2]How can i get Equip Reigons Name With EntIndex?
Reply With Quote #2

Get the item's definition index (the m_iItemDefinitionIndex netprop), then use TF2Econ_GetItemEquipRegionGroupBits native (from Econ Data) to get the computed bitflags for those equip regions.

From there you can convert them back to group names by testing each set bit against each group index.

Here's an example in the schema compatibility shim that returns the names in an ArrayList (except it'll also include names that occupy the same "shared" group, as they're indistinguishable in the parsed data).

This sounds like an xy problem; what are you trying to accomplish with this information?
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 06-27-2020 at 10:47.
nosoop is offline
ABCDEFGH23
New Member
Join Date: Jun 2020
Location: HEEELP!!!
Old 07-02-2020 , 06:24   Re: [TF2]How can i get Equip Reigons Name With EntIndex?
Reply With Quote #3

Many thank you
ABCDEFGH23 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:58.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode