AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [TF2]How can i get Equip Reigons Name With EntIndex? (https://forums.alliedmods.net/showthread.php?t=325555)

ABCDEFGH23 06-27-2020 02:31

[TF2]How can i get Equip Reigons Name With EntIndex?
 
EX:
hat
arms, feet
head_skin
necklace
glasses
back
scout_shirt
.
.
.

nosoop 06-27-2020 10:44

Re: [TF2]How can i get Equip Reigons Name With EntIndex?
 
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?

ABCDEFGH23 07-02-2020 06:24

Re: [TF2]How can i get Equip Reigons Name With EntIndex?
 
Many thank you


All times are GMT -4. The time now is 00:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.