Jump to content
McKay Development

How can i check if item was send in previouse offer


Recommended Posts

Here is the case

1. First trade offer I am sending from bot to user item 'CS:GO Case Key' but he does not accepting it yet

2. Second trade was requested and bot sending to user2 item 'CS:GO Case Key' but it is in trade offer 1 two.

 

3. And when some of the users accept trade offer one of offers is in "InvalidItems" state.

How can I prevent this? Is there a property in CEconItem which tell us that item is in trade already?

Something like this (dummy code):
 


offers[roundBot].loadInventory(730, 2, true, function (err, myItems) {

        for (var i = 0; i < myItems.lenght; i++) {
            if (myItems[i].isAvailable == 1) {
                itemsToSendArray.push(myItems[i]);
            }
        }
}
Edited by mouzes1
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...