Jump to content


Photo
Question

Tf2-node Checking if item is tradable and marketable



  • Please log in to reply
1 reply to this topic

#1 Preport

Preport

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 30 September 2018 - 05:30 AM

Hi I'm having some problems to get it to work I currently have 3 quackenbirds(947) one of them which is not tradable and not marketable but when I run this code return is 3.

 

for (var i = 0;i <tf2.backpack.length; i++){
   if (tf2.backpack[i].defIndex ==  947 && !tf2.backpack[i].flag_cannot_trade && !tf2.backpack[i].flag_cannot_craft){
   quack++;
   }
}


#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,810 posts

Posted 30 September 2018 - 09:14 PM

Determining from node-tf2 if an item is tradable is a task. There are like 4 different ways something can be untradable. There could be a flag, there could be one of several attributes, there could be a specific origin (achievement item).

 

You're probably better off just getting your inventory from Community.







Also tagged with one or more of these keywords: Question

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users