rakijah / CSGSI

A simple C# library to interface with Counter-Strike: Global Offensive's Game State Integration
Other
129 stars 27 forks source link

No update for allplayers_id in Competitive #15

Closed XBase-xOR closed 7 years ago

XBase-xOR commented 7 years ago

In the respective CFG I enabled allplayers_id (and none of the other allplayers options, because I only need the list of names and Steam IDs on my team). Then on the NewGameState event I check whether (gs.AllPlayers.Count > 0) and if it is I process the information in gs.AppPlayers.

This works fine as long as I am playing Casual, everytime I die I get a NewGameState event that carries this information.

However, if I start playing Competitive it doesn't work, I simply never get any updates where (gs.AllPlayers.Count > 0).

Not sure whether this is a problem with this C# class or whether it's a problem with CS itself.

rakijah commented 7 years ago

You can't use AllPlayers in competitive, you only have access to your own information or the person you're currently spectating (both through the Player node).

XBase-xOR commented 7 years ago

Weird. This would make sense when it was about allplayers_state but the ID information is visible anyway, typing "status" in console shows pretty much the same data (just the steamID instead of steamID64) both for my team mates and opponents so there should be nothing secret about it.

Thanks for clarifying anyway. Since I only need that information once per match and only for my team mates I changed my code to simply grab it from the player I am currently spectating. Throughout a full match I always spectate each of my team mates at some point so at the end of the match the data is complete and it has been sufficient until now. Let's hope I am never playing that godlike that I never die a single round :-P