XeoN Posted July 27, 2018 Report Posted July 27, 2018 Hi, I searched on the forum, but i didn't find any problem or question like this. I want to run a function, when a friend start a specified appid. With other library (seishun's node-steam) I made like this: steamFriends.on('personaState', function(friendObj) { if (typeof(steamFriends.personaStates[friendObj.friendid]) != 'undefined') { // If player started CS:GO if (friendObj.gameid != steamFriends.personaStates[friendObj.friendid].gameid && friendObj.gameid == 730) { function(); } } }); But with node-steam-user lib I tried it with this: client.on('user', function(steamid, friendObj)But I didn't find the way, how I can run it only once, not every game update. Ex. join to lobby in cs:go. Quote
Dr. McKay Posted July 28, 2018 Report Posted July 28, 2018 You're correct that you want to use the user event. If you don't want to receive further updates for the user event, you can use removeListener. Quote
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.