-
-
Notifications
You must be signed in to change notification settings - Fork 53
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to find a players rank? #33
Comments
I'm not sure it is possible - the ranks are sent via Steam network channels and not the in-game network channels, so it's not recorded in the demo. |
What about the CCSUsrMsg_ServerRankUpdate protobuf? |
Potentially... I think if you listen for that message, you should be able to find the player whose rank has changed by comparing xuid_lo from PlayerInfo with account_id from the message. Let me know how you get on. |
Will assume that this resolved your issue |
I don't think the issue is resolved (as noone has replied with a patch or working code). |
demoFile.userMessages.on('ServerRankUpdate', um => {
console.log('Player rank updates:');
for (let update of um.rankUpdate) {
let player = demoFile.players.find(player => player.userInfo.xuid.getLowBits() == update.accountId);
console.log(`> ${player.name}: ${update.rankOld} -> ${update.rankNew}`);
}
}); |
Doesn't seem to work. Does it mean this message is not always sent? |
The rank is only sent at the end of MM matches, and only those recorded by gotv. |
Thank you for the reply! I do check the MM match recorded by GOTV though. http://replay192.valve.net/730/003377779566117388614_0320438711.dem.bz2 |
I think the API has changed slightly since I posted that comment. See the below code (tested on your demo and works): demoFile.userMessages.on("ServerRankUpdate", um => {
console.log("Player rank updates:");
for (const update of um.rankUpdate) {
const player = demoFile.players.find(
player =>
player.userInfo &&
player.userInfo.xuid.getLowBits() === update.accountId
);
if (!player) console.log(`> (unknown player ${update.accountId})`);
else
console.log(
`> ${player.name}: ${update.rankOld} -> ${update.rankNew}`
);
}
}); Outputs:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I have been looking through the docs and I can't seem to find anything leading to players ranks. Is there any way of finding a players rank and if not is it possible to implement in the future?
The text was updated successfully, but these errors were encountered: