Seeringfate Posted June 6, 2017 Report Share Posted June 6, 2017 Hi there, Is there a way to save sent offers to a file (save some needed information in it + the tradeoffer), that when this offer is accepted (or declined) that you run a block of code attached to this file ? As I see it now with the "receivedOfferChanged" you can only check if the offer is changed and do something with the steamid from the recipient.I want to run code which also use mySQL databases, so I need a way to save offers. If this is too much to ask it's alright. Thanks anyway ! Seeringfate Quote Link to comment Share on other sites More sharing options...
AlaDyn172 Posted June 6, 2017 Report Share Posted June 6, 2017 Yes, you can do this by creating an object and then with 'writeFileSync' you write it on a file.And on starting the script call a function 'readFileSync' and for each offer to add it to an object.Then you can do whatever you want. xD Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted June 7, 2017 Report Share Posted June 7, 2017 You can also connect to MySQL using Node: https://www.npmjs.com/package/mysql Quote Link to comment Share on other sites More sharing options...
Seeringfate Posted June 8, 2017 Author Report Share Posted June 8, 2017 Fixed it by adding an extra table in MySQL and saving data there and after the trade is accepted or declined remove the data and execute code according to data in table. Thank for the help ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.