I personally use a system with only 4 checkpoints that tracks position at each checkpoint. Mine is lap based though, so it needs to be able deal with that too.
I track each player entering checkpoints use the distributedgametime function to figure out when they hit it. Then I use they lap they are on, and which checkpoint. So in my case, if they just hit Checkpoint 3 then I make their checkpoint value be 1. If they hit Checkpoint 4, I make their checkpoint value be 4. If they hit Checkpoint 1, 3, and so on. When they hit the Checkpoint 4, I divide their lap value by 5. The reason for this is to make their lap count count for more than checkpoints. The Initial Lap Value is 100,000 just so that way it’s big enough that it’ll never matter really. (I also use this in conjunction which checking their checkpoint value when they hit the checkpoint to make sure they’re going the right way. They can’t hit Checkpoint 4 again until they hit Checkpoint 3. They can’t hit Checkpoint 3 again until they hit Checkpoint 2, and so on.)
(In the case of a 10 gated thing, either use halves for your Checkpoints, or tenths, or use something larger than ten to divide the lap value by. The dividing of the lap value should be larger than the highest checkpoint value.)
So, how does this all end up working out then?
Car 1 has a Lap value of 160 and a Checkpoint Value of 2.
Car 4 has a Lap value of 160 and a Checkpoint Value of 4.
Car 3 has a Lap Value of 800 and a Checkpoint Value of 1.
Now, I multiply these values together.
Car 1’s overall value is 320.
Car 4’s overall value is 640.
Car 3’s overall value is 800.
I use a system that takes the smallest value and puts them in First, and then the next Smallest in Second, and so on. However, if two people were on the same checkpoint and lap, they’d be tied, right? Well, I also combine in the distributedgametime, and add that number in. By adding that number in the first place car will be the driver who hit that checkpoint on that lap first because their distributedgametime value will be smallest.
That being said, that’s just how I do it, and it’s probably extremely inefficient. I use a script inside the vehicleseat of every car to change the values, I use scripts inside the checkpoints to determine when a car hits it and re-run all the values for sorting them into order, I use num values in a folder in the map’s model grouping to store all the values, and I use a script inside each driver’s section of values to determine if the player left, and if they have to remove them from the list.