Comments (10)
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}`);
}
});
from demofile.
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:
Player rank updates:
> GundelGaukeley2: 11 -> 11
> Frezzz chlenix.exe: 10 -> 10
> ็: 10 -> 10
> Cerberus: 9 -> 9
> d0h: 8 -> 8
> Comrade Gamer: 10 -> 10
> Tor: 10 -> 10
> twitch.tv/jacus_minecraft_cs: 10 -> 10
> Łukasz Borzym: 9 -> 10
> (unknown player 396707352)
from demofile.
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.
from demofile.
What about the CCSUsrMsg_ServerRankUpdate protobuf?
from demofile.
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.
from demofile.
Will assume that this resolved your issue
from demofile.
I don't think the issue is resolved (as noone has replied with a patch or working code).
How would one go about listening for that message anyway? I don't see any net related things exposed?
from demofile.
Doesn't seem to work. Does it mean this message is not always sent?
from demofile.
The rank is only sent at the end of MM matches, and only those recorded by gotv.
from demofile.
Thank you for the reply! I do check the MM match recorded by GOTV though.
http://replay192.valve.net/730/003377779566117388614_0320438711.dem.bz2
from demofile.
Related Issues (20)
- Missed Examples in Documentation HOT 1
- Valve Matchmaking Encrypted Chat HOT 6
- trouble while complie dumpfile.ts HOT 2
- Some Player Stats did not appear
- Illegal offset HOT 2
- error TS2532: Object is possibly 'undefined' HOT 1
- Documentation missing properties HOT 2
- Some demos missing `round_announce_match_start` HOT 3
- Wrong parse streams with transformation HOT 1
- Game event buytime_ended triggers only once HOT 3
- Is it possible to find out the skin of a weapon? HOT 1
- GOTV+ Broadcasting HOT 13
- demo.teams[0] `members` property is always empty HOT 1
- Events not firing
- itemPurchase Event - Cost HOT 1
- ServerRankUpdate doesnt work anymore HOT 3
- Is it possible to get the colors (blue, green, orange, yellow, purple) from players?
- isAlive not always working HOT 1
- Will this work with new Counter Strike 2? HOT 1
- m_iMatchStats_Deaths not sorted properly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demofile.