Jump to content
McKay Development

Recommended Posts

Posted

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. 

 

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...