Line numbers below are based on the latest version of the scripts checked in today
question 1 & 2:
line 43: definition of color ‘yellow’
local yellow = {r = 255, g = 255, b = 0}
line 1153: checkpoint color at start of race set to yellow - 4th field
raceCheckpoint = makeCheckpoint(arrow3Checkpoint, waypointCoord, waypoints[2].coord, yellow, 127, 0)
line 1559: checkpoint color after race start set to yellow - 4th field
raceCheckpoint = makeCheckpoint(checkpointType, waypointCoord, nextCoord, yellow, 127, 0)
Color opacity of checkpoints is set to 127 in calls to ‘makeCheckpoint’ above, 5th field. Max is 255.
question 3:
lines 62 - 65: checkpoint types
local finishCheckpoint = 9 – cylinder checkered flag
local midCheckpoint = 42 – cylinder with number
local plainCheckpoint = 45 – cylinder
local arrow3Checkpoint = 7 – cylinder with 3 arrows
checkpoint types documented at:CreateCheckpoint - Natives @ Cfx.re Docs
line 179 - 183: I adjusted the height(zCoord) of checkpoints based on type. If it is type 42 or 45, I don’t increase the height. If it is neither, I increase the height by the radius of the waypoint.
local function makeCheckpoint(checkpointType, coord, nextCoord, color, alpha, num)
local zCoord = coord.z
if checkpointType ~= 42 and checkpointType ~= 45 then
zCoord = zCoord + coord.r
end
question 4:
The hud is drawn in lines 1415 - 1470 using ‘drawMsg’ function at line 288
local function drawMsg(x, y, msg, scale)
x and y are percentages. x = 0.0 means all the way left. x = 1.0 means all the way right. Similar for y.
Color of the text is set on line 291 in ‘drawMsg’ function
SetTextColour(255, 255, 0, 255)
Left and right side of hud is set to the following values on lines 77 - 78 used in ‘drawMsg’ calls
local leftSide = 0.43 – left position of HUD
local rightSide = 0.51 – right position of HUD