When we first start the track the Player.CurRace.Checkpoints table is empty for each player. Once we finish the map the Player.CurRace.Checkpoints of the player which has the manialink is reseted but it isn't reseted for any other players.
SO we are using this technique to catch player checkpoints : http://forum.maniaplanet.com/viewtopic. ... 10#p200391
The code we uses looks like this.
Code: Select all
foreach (Player in Players) {
declare lastCp for Player = -1;
if (lastCp != Player.CurRace.Checkpoints.count) {
lastCp = Player.CurRace.Checkpoints.count;
if (lastCp > 0 && lastCp % (totalCp) == 0 && totalCp > acceptMinCp) {
//DO stuff
}
}
}
Here is my logs when playing
Code: Select all
LR: oliverde8: Current CP: 1 of 1 on lap 0, CP-Times: [8626]
LR: undef.de: Current CP: 1 of 1 on lap 0, CP-Times: [9536]
LR: reaby: Current CP: 1 of 1 on lap 0, CP-Times: [13597]
LR: oliverde8: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: oliverde8: Current CP: 1 of 1 on lap 0, CP-Times: [7439]
LR: oliverde8: Current CP: 0 of 1 on lap 0, CP-Times: []
Code: Select all
LR: undef.de: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: reaby: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: oliverde8: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: oliverde8: Current CP: 1 of 1 on lap 0, CP-Times: [8626]
LR: undef.de: Current CP: 1 of 1 on lap 0, CP-Times: [9536]
LR: reaby: Current CP: 1 of 1 on lap 0, CP-Times: [13597]
LR: undef.de: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: undef.de: Current CP: 1 of 1 on lap 0, CP-Times: [7930]
LR: undef.de: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: undef.de: Current CP: 1 of 1 on lap 0, CP-Times: [215797]
LR: undef.de: Current CP: 0 of 1 on lap 0, CP-Times: []
LR: undef.de: Current CP: 1 of 1 on lap 0, CP-Times: [8028]
LR: undef.de: Current CP: 0 of 1 on lap 0, CP-Times: []
So for undef my checkpoints are never reseted
and for me his checkpoints.
So the code just blocks thinking the players doesn't pass through the finish.
Thanks