Modify the getUpcomingCheckpoints() function in main.lua
local function getUpcomingCheckpoints()
local coord1, coord2, coord3, coord4, coord5
local coord1Label, coord2Label, coord3Label, coord4Label, coord5Label
local totalCheckpoints = #CurrentRaceData.Checkpoints
local currentIndex = CurrentRaceData.CurrentCheckpoint + 1
local checkpoints = {}
local maxPillars = Config.DrawTextSetup.maxPillars or 3
if CurrentRaceData.Lap < 2 and CurrentRaceData.CurrentCheckpoint == 1 then
checkpoints[1] = {
coord = vector3(
CurrentRaceData.Checkpoints[1].coords.x,
CurrentRaceData.Checkpoints[1].coords.y,
CurrentRaceData.Checkpoints[1].coords.z
),
label = Lang('starting_line')
}
end
for i = 1, maxPillars do
local coord = getCheckpointCoord(currentIndex + i - 1, totalCheckpoints)
if coord then
local label
if i == 1 then
label = getFinishLabel(totalCheckpoints, currentIndex) or Lang("checkpoint_next")
elseif i == 2 then
label = getFinishLabel(totalCheckpoints, currentIndex + 1) or Lang("checkpoint_2nd")
elseif i == 3 then
label = getFinishLabel(totalCheckpoints, currentIndex + 2) or Lang("checkpoint_3rd")
else
label = Lang("checkpoint") .. " " .. i
end
checkpoints[#checkpoints + 1] = { coord = coord, label = label }
end
end
return checkpoints
end