A Trackmania Next plugin, allowing to see the total number of players who played a map.So you can more precisely see where you are in terms of performance.
To get the number of contenders, I use the CGameScoreAndLeaderBoardManagerScript::MapLeaderBoard_GetPlayerCount.
As said in the OpenPlanet documentation, give as arguments the mapuid, a empty context and the zone of the player.
void updateContendersCount() {
auto app = cast<CTrackMania>(GetApp());
auto network = cast<CTrackManiaNetwork>(app.Network);
if (network.ClientManiaAppPlayground !is null && network.ClientManiaAppPlayground.Playground !is null && network.ClientManiaAppPlayground.Playground.Map !is null) {
if (!mapidIsValid(mapid)) {
mapid = network.ClientManiaAppPlayground.Playground.Map.MapInfo.MapUid;
}
CGameScoreAndLeaderBoardManagerScript@ manager = network.ClientManiaAppPlayground.ScoreMgr;
for (int i = 0; i<zoneContenders.Length;i++) {
zoneContenders[i] = manager.MapLeaderBoard_GetPlayerCount(mapid, "", wstring(zoneNames[i]));
}
}
To get the number of contenders, I use the CGameScoreAndLeaderBoardManagerScript::MapLeaderBoard_GetPlayerCount. As said in the OpenPlanet documentation, give as arguments the mapuid, a empty context and the zone of the player.
Executing this code, the array zoneContenders is filled by 0.