Jump to content
McKay Development

How get all Items in DOTA2 , TF2 , CS:GO ?


mrxbell

Recommended Posts

//730 for csgo, 2 for contextid, true for tradableOnly
//This will load a user's inventory or you can use it for your own inventory (optional), but there's loadInventory which is used to get your own client's inventory.
manager.loadUserInventory(YOUR_TARGET_STEAMID, 730, 2, true, function (err, inventory, currencies) {
        if (err) {
            console.log(err.message);
        } else {
             console.log(inventory);
        }
});

More information can be found here.

 

Best regards

UKF

Edited by UKF
Link to comment
Share on other sites

//730 for csgo, 2 for contextid, true for tradableOnly
//This will load a user's inventory or you can use it for your own inventory (optional), but there's loadInventory which is used to get your own client's inventory.
manager.loadUserInventory(YOUR_TARGET_STEAMID, 730, 2, true, function (err, inventory, currencies) {
        if (err) {
            console.log(err.message);
        } else {
             console.log(inventory);
        }
});

More information can be found here.

 

Best regards

UKF

 

Thanks. But i need get all items (example DOTA2 have ~ 10 000 items ...) . 

Link to comment
Share on other sites

Thanks. But i need get all items (example DOTA2 have ~ 10 000 items ...) . 

 

Just change the appid to 570, and change the context id, I have no idea if it's 0,1 or 2, just try it.

The inventory is an array of your items,

inventory.forEach(function (item)){
      console.log(item.market_hash_name);
}

This will print the item's market hash name for example.

Link to comment
Share on other sites

Just change the appid to 570, and change the context id, I have no idea if it's 0,1 or 2, just try it.

The inventory is an array of your items,

inventory.forEach(function (item)){
      console.log(item.market_hash_name);
}

This will print the item's market hash name for example.

Thank. But this is only iventory of one account. I need get all items in game ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...