Steam Web Api: CS:GO Getting Skin name of items

5.1k Views Asked by At

So I"m using steam api get the player's inventory items and then the schema to get the item names. Backpack: http://api.steampowered.com/IEconItems_730/GetPlayerItems/v0001/ Schema: http://api.steampowered.com/IEconItems_730/GetSchema/v0002/

But it only gives me the original item name for example

M4A4 instead of M4A4 | Faded Zebra (Battle-Scarred)

How can I get the added skin name to the weapon name?

I also tried lookating the attributes defindexes but defindex don't seem to link to skin names in the csgo_english.txt.

1

There are 1 best solutions below

2
On

The skins information is saved as an attribute of the item itself. Look for the item's attributes with the defindex of 6, it's value is equal to the identifier in the schema paint_kits section. Then you'll have to translate the schema paint name to your native language to get something readable instead of aq_oiled or some other such nonsense. Lastly to get the (Battle-scarred) bit just look at the attribute with defindex of 8's float_value to determine what the wear on the skin is.