Jump to content
McKay Development

Requesting accountData


Arty
 Share

Recommended Posts

1 hour ago, 4049_1572836826 said:

steam-user appLaunched event 

I hate to ask, but I'm not able to check it out, however what I think is going on is that accountData is only emitted every once in a while to a specific instance (as in steam), which I hope is not the case, is that solution working on every CS:GO startup? (Like even if I were to quit the game and log back in an instant)

Link to comment
Share on other sites

sorry, my bad, 

Quote

A big object containing account data and some statistics including players in-game. Undefined until accountData is emitted.

csgo.on("accountData", (data) => {
console.log(data);
console.log("Data", csgo.accountData);
});

try: 

csgo.on("connectedToGC", () => {
console.log("Connected to GC");
csgo.requestPlayersProfile(client.steamID);
});
 
csgo.on("playersProfile", (data) => {
console.log(data);
});

I got on first logon from

csgo.on("accountData", data => 

 image.png.f00dfee806b57bd1089dcd6fff92e5e4.png

And second run nothing

image.png.5b463b7f0f713935dd5cb0b472111a5e.png

Edited by 4049_1572836826
Link to comment
Share on other sites

This is a known thing and it's on Valve's side, not the module's side. When you kill your Steam session then reconnect quickly after and launch CS:GO, sometimes the CS:GO GC doesn't fully realize that you actually disconnected so it doesn't realize that you reconnected, and it doesn't send you all the at-launch data.

The best way I've found to prevent this from happening is to make sure that you gracefully log off of Steam every time your bot shuts down using the logOff() method.

Link to comment
Share on other sites

8 hours ago, Dr. McKay said:

This is a known thing and it's on Valve's side, not the module's side. When you kill your Steam session then reconnect quickly after and launch CS:GO, sometimes the CS:GO GC doesn't fully realize that you actually disconnected so it doesn't realize that you reconnected, and it doesn't send you all the at-launch data.

The best way I've found to prevent this from happening is to make sure that you gracefully log off of Steam every time your bot shuts down using the logOff() method.

Thanks for the reply. Just in case, I'll ask anyway; isn't there a way to let GC know you closed CS? Eg something like user.gamesPlayed([]) or csgo.close()?

Link to comment
Share on other sites

client.sendToGC(appId, 4006, {}, Buffer.alloc(0)); // ClientHello

client.on("receivedFromGC", (appId, msgType, payload) => {
	if (msgType === 4004) {
    	// ClientWelcome
		client.sendToGC(appId, 9109, {}, Buffer.alloc(0)); // MatchmakingClient2GCHello
	else if (msgType === 9110) {
    	// MatchmakingGC2ClientHello
		// protoDecode CMsgGCCStrike15_v2_MatchmakingGC2ClientHello
		// This work correctly
 	}
})

Work for me. 

Edited by 4049_1572836826
Link to comment
Share on other sites

9 hours ago, Arty said:

Alright, it seems I got it working.

user.gamesPlayed( [ ] );
user.logOff( );

While using user.logOff( ) as per @Dr. McKay seemed to work at times, having user.gamesPlayed( [ ] ); & user.logOff( ) seems to work all the time.

Yeah, this is right. gamesPlayed([]) before logOff works best, I'd forgotten about that step.

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

×
×
  • Create New...