Usage — Tracks, Races, Competitions & ELO | Advanced Racing FiveM | Quasar Store
Documentation
Usage
How Advanced Racing works in FiveM: build tracks by driving, run normal races and ranked competitions, join at the start line, payouts, ELO ratings, the leaderboard and automated competitions.
Everything a driver does outside the car happens on the tablet: F10 or the tablet item opens it, ESC closes it. Four pages sit along the top bar, and the avatar in the corner opens the driver's profile.
Page
What is there
Home
A welcome with the driver's last competition, the position they reached and their rating, and the 30 most recent events — new tracks, new competitions and winners.
Tracks
Every track on the server, filtered by All, Favorite or Verified and searchable by name. Create builds a new one; each card opens the track or a New Race on it.
Races
Upcoming races with their start time, prize pool, buy-in, class and organiser, and the last 100 completed competitions with their podium and full results.
Leaderboard
The top 20 drivers by competition ranking, with their tag, races, competitions and average position.
Profile
The driver's name, avatar link, tag, and two colours: the checkpoint colour seen in the world and the GPS colour of the checkpoint blips. White, red, green, blue, violet or orange.
Names hold up to 20 characters. A new driver starts with their character's first name, the tag newbie and a rating of 0. The avatar is a link to an image.
Any player can build a track. It is drawn by driving it: you place each checkpoint from inside the car, where the car stands, and props go down in pairs, one either side of it — the way tyre walls or flags line a road.
Open the creator
Tracks → Create. Pick Sprint (from A to B) or Circuit (laps) and press Turn On Track Creation Mode. The Creator panel with its keys appears on the right of the screen.
Drive the route
Close the tablet and get in a vehicle — the creator only works from inside one. Drive to the start line and place checkpoint 1 there, then follow the route placing a checkpoint at each turn and props where you want them. Two see-through props show where the next pair will land.
Name it and save
Reopen the tablet, fill in the Track Name, the Track Description and, if you like, an Image Link — a direct link to a picture, shown on the map card. Press Create Track. The track appears in the list and in the recent events.
Key
Does
E
Place a checkpoint where the vehicle stands. Checkpoints are numbered in the order you place them.
ENTER
Place a pair of props, one to the left and one to the right of the vehicle.
↑ ↓
Move the props further from or closer to the vehicle, between 1 and 20 metres. Hold to keep moving.
← →
Rotate the props. Hold to keep turning.
L ALT
Switch to the next prop in the list — a tyre stack and a flag pole by default.
L CTRL
Delete a placed prop. Stand within 3 metres of it — it says so above it.
DELETE
Delete the checkpoint nearest to you.
A track is accepted when it has a name, a description, at least one checkpoint and at least one prop, and its first and last checkpoints are more than 10 metres apart. Checkpoints must be 5 metres from each other, and so must props. Delete Points and Objects clears everything placed so far.
For a circuit, finish the route a little before the start line rather than on top of it: the last checkpoint must be at least 10 metres from checkpoint 1. Each lap closes by driving back through checkpoint 1.
Track Information on a card opens the track: its number of points and objects, its type, how many times it was raced, the share of drivers who finished, and its Best Times — every driver's fastest competition time on it, with their vehicle and class. The buttons in the corner:
Button
Does
Play
Create a race on this track.
Flag
Set a waypoint on the start line.
Map
Show every checkpoint on your map for 20 seconds. Not available while you are in a race.
Bin
Delete the track. Shown to the driver who built it.
The star on a card adds the track to the driver's favourites. The tick marks a verified track: only admins can set or remove it, and only verified tracks can hold competitions.
A quick race on any track, verified or not. New Race on a track's card, Race Type Normal:
Field
Meaning
Required Classes
The class a vehicle must be to enter: X, S, A, B, C or D. None lets any vehicle in.
Lap Amount
0 drives the checkpoints once, start to finish. 1 or more loops back through checkpoint 1 that many times.
Time Until Start
Seconds until the start, up to 60. Entry closes at the start.
DNF Timer After Winner
Seconds the others have to finish once the first driver crosses the line.
Buy-In
What each driver pays to enter. 0 makes it free — and pays nothing out. See Payouts.
Normal races are not saved: a restart removes the ones that have not run. They change a driver's rating but not their competition ranking, and their results are not kept on the track's best times.
One race per track at a time. While a race on a track has not finished, a second one on the same track is refused with Track is already in use.
Competitions are the ranked races. They run only on verified tracks, are saved so they survive a restart, record every driver's result, and move the competition ranking that orders the leaderboard.
The Competition race type appears to drivers whose rating is at least Config.CompetitionCreationMinElo (1250), and always to admins. Choosing it opens two parts:
Part
What you set there
Race Settings
Total Prize (shown as the prize pool), Buy-In, Start Time — a time of day, today — and Required Classes. The DNF timer is Config.DnfTimer.
Competition Series
The competitions already scheduled, and below them every verified track that is still free. Click a track to add it to the series — one competition per track, all with the settings above. The pencil sets its laps (a sprint starts at 0, a circuit at 1); the bin removes it.
Create Race schedules the whole series at once. Each competition gets its blip, appears under Races → Organized Competitions, and is announced in the recent events.
The bin on a row of Organized Competitions cancels it. Only its organiser or an admin can, and not in the last 5 seconds before the start.
Races → Completed Races lists the last 100 competitions with their podium, organiser, how many drivers took part and what share finished. Click the podium for the result sheet: position, driver and tag, finish time and gap to the winner, vehicle and class, rating change, and the money earned. A driver who did not finish reads DNF.
Every upcoming race has a yellow flag blip on its start line. Hover it in the pause menu for its card: the track's picture, DNF timer, organiser, whether it is a competition, buy-in, vehicle class and description.
Drive within 30 metres of the start line in a vehicle and the race's details float above it — name, type, checkpoints, laps, the time left before the start, buy-in and class — with the prompt to join.
Rule
Detail
Joining
Press E. The buy-in is taken from Config.MoneyType.
Vehicle class
The vehicle's class must be the race's class exactly, unless the race says None. A higher class does not count.
Minimum rating
Automated competitions can ask for one. Below it, joining is refused.
Waiting
Once in, the car is held on the line until the start: only the camera moves.
Leaving
Press E again before the start. The buy-in is refunded.
At the start time entry closes and every driver on the line goes through the same opening:
The title
The screen fades, the camera rises above the grid and the track's name and description fill the screen for five seconds.
The driver showcase
The camera flies to each car in turn, highest rating first, with a card for the driver: avatar, name, tag and rating. Each shot is picked at random from Config.CameraAnimations.
Your car
A short camera move around your own car brings you back behind the wheel.
The countdown
3, 2, 1, GO — the car is released and the race HUD appears.
Where
What is there
Top left
Your position out of the field, and the running order of every driver. Positions go by lap, then checkpoint, then distance to the next checkpoint.
Top right
Progress in percent, the race time, checkpoints passed out of the total, and the DNF timer once it is running.
The road
The next checkpoint in your checkpoint colour, its arrow pointing to the one after, and a chequered flag on the last. Drive within Config.CheckpointSize metres of it to pass.
The map
Numbered blips on every checkpoint in your GPS colour, and a waypoint on the next one.
With Config.Ghost on, racers' cars pass through each other. With Config.NoNpc on, traffic is cleared around every racer. Tyre stacks flare as you drive past them.
Crossing the last checkpoint ends your race with your time — and your best lap on a circuit. Every racer is told who finished and in which place. From the first finish, the DNF timer counts down for the rest; whoever has not finished when it reaches zero is eliminated and listed as DNF.
The race closes when every driver has finished or dropped out. Ratings are updated, a competition's results are saved, and five seconds later the checkpoints, props and blip are removed.
Money is paid only when the race has a buy-in, into Config.MoneyType, the moment a driver finishes. How much each place gets depends on how many drivers entered, and is a share of the buy-in amount:
Drivers
1st
2nd
3rd
1 or 2
100%
—
—
3
70%
30%
—
4 or more
60%
30%
10%
The percentages for three and for four or more drivers are Config.Splits. A competition's Total Prize is the figure shown as its prize pool; what is paid out is worked out from its buy-in. On Quasar Inventory a paid finish also counts towards the Race Winner quest.
lua
-- [position] = share of the buy-in
Config.Splits = {
three = { [1] = 0.7, [2] = 0.3 }, -- exactly 3 drivers
more = { [1] = 0.6, [2] = 0.3, [3] = 0.1 } -- 4 drivers or more
}
Every driver carries two numbers. Both change only in races with at least two drivers.
Number
Changed by
Used for
Rating (ELO)
Every race, normal or competition.
The driver's tag, the right to organise competitions, minimum-rating competitions, and the order of the driver showcase.
Ranking
Competitions only.
The leaderboard.
Both are worked out the same way. Each driver is compared with every other: finishing ahead gains points, finishing behind loses them, and beating a driver rated above you is worth more than beating one below. A bonus for the finishing position is added on top. The winner gains at most 30 and the last driver loses at most 20. A driver who was eliminated or left after the start counts as last. The new numbers reach the tablet as soon as the race closes.
The tag follows the rating, from Config.Tags:
lua
-- [minimum rating] = tag. Keep the [0] entry: it is every new driver's tag.
Config.Tags = {
[0] = 'newbie',
[500] = 'rookie',
[1000] = 'experienced',
[2000] = 'veteran',
[3000] = 'expert',
[6000] = 'master',
[20000] = 'legend',
[50000] = 'god',
}
The Leaderboard lists the top 20 drivers by ranking — only drivers whose ranking is above 0, so it fills up once competitions have been raced.
The server can organise competitions on its own, so there is always something to race. Each entry in Config.AutomatedCompetitions is one competition that is created at start-up, raced, and created again five seconds after it closes. They are organised by the Automated driver, whose name and avatar are Config.AutomatedUser.
lua
Config.AutomatedCompetitions = {
{
id = 1, -- a unique number per entry
tracks = nil, -- nil: a random verified track that is free
minElo = 100, -- rating needed to join (0 = anyone)
startTime = 'every18', -- a key of Config.PredefinedTimes
vehicle_class = 1, -- 1 = any vehicle, see Vehicle classes below
prize = 50000, -- shown as the prize pool
buy_in = 10000, -- paid to enter; leave it out and it equals the prize
laps = 0-- 0 = once through, 1 or more = laps
},
}
startTime names an entry of Config.PredefinedTimes. A number is the seconds from the moment the competition is created. A table is a time of day: the competition is set for that time on the following day.
lua
Config.PredefinedTimes = {
['2min'] = 120, -- 2 minutes after it is created
['5min'] = 300, -- 5 minutes after it is created
['every18'] = { year = date.year, month = date.month, day = date.day, hour = 18, min = 0, sec = 0 },
['every20'] = { year = date.year, month = date.month, day = date.day, hour = 20, min = 0, sec = 0 },
}
Time-of-day entries are counted from the date the server started, so they rely on a daily restart, as most servers already do. If no verified track is free, the server tries again every minute until one is.
Everything below lives in shared/config.lua unless stated otherwise. Restart the resource after a change.
Language and framework
lua
Config.Locale = 'en'-- any file name from locales/: en, es, fr, de, pt, it, ...
The framework is detected and needs no setting. A key missing from your language falls back to English, with a warning in the console naming it.
Race behaviour
lua
Config.Ghost = true-- racers' cars pass through each other
Config.NoNpc = true-- clear traffic around racers
Config.CheckpointSize = 10.0-- checkpoint size, and how close you must drive to pass it
Config.DefaultBlipImage = 'https://...'-- picture on the map card of tracks without one
Config.DnfTimer = 120-- competitions: seconds to finish after the winner
Vehicle classes
Config.VehicleClasses gives each GTA vehicle class a racing class. The class numbers are those of Enums.VehicleClasses: 1 None, 2 X, 3 S, 4 A, 5 B, 6 C, 7 D. As shipped:
Config.CameraAnimations is the pool of shots for the driver showcase; each driver gets one at random. A shot moves from one position around the car to another, at a distance in metres, while the field of view changes from fovFrom to fovTo.
lua
{ distance = 4.0, fovFrom = 20.0, fovTo = 35.0, from = 'front-middle', to = 'front-left' },
Positions: front-left, front-middle, front-right, back-left, back-middle, , , , , , , , and the four diagonals , , , .
Track creator
lua
Config.Creator.objectDistance = 3.0-- starting distance of the props from the car
Config.Creator.minObjectDistance = 1.0
Config.Creator.maxObjectDistance = 20.0-- The props L ALT cycles through
Config.Creator.objects = {
joaat('prop_offroad_tyres02'),
joaat('stt_prop_flagpole_2e')
}
-- Props that flare when a racer drives past
Config.Creator.particledObjects = {
[joaat('prop_offroad_tyres02')] = true,
}
Config.Creator.keys holds the keys as GTA control numbers. justPress = true acts once per press, false repeats while held.
Money, the tablet and competitions
lua
Config.MoneyType = 'money'-- account buy-ins are taken from and prizes paid into
Config.TabletItem = 'tablet'-- usable item that opens the tablet; nil to disable
Config.AccessTabletWithKey = 'F10'-- default key; nil to disable
Config.CompetitionCreationMinElo = 1250-- rating needed to see the Competition race type
On QBCore and Qbox, money means the cash account; bank works on every framework.
Currency format
How amounts are written on the tablet, using the browser's number formatting:
The texts written to the Home feed. %s is the track's name.
lua
Config.RecentEvents = {
winner = 'Competition winner on track: %s',
create_track = 'Created a new track: %s',
create_competition = 'Created a new competition: %s'
}
The "Competitions every day at 19:00" line on Home is the locale key dashboard.competition_date — change it in your language file to match your own schedule.
Names and colours (enums.lua)
shared/enums.lua holds the names of the track types (Sprint, Circuit), race types (Normal, Competition) and vehicle classes, and the RGB value of each checkpoint colour. Change the values, never the numbers in brackets — tracks, races and profiles are saved with those numbers.
lua
Enums.CheckpointColors = {
[0] = { r = 255, g = 255, b = 255 }, -- White
[1] = { r = 255, g = 0, b = 0 }, -- Red
[2] = { r = 0, g = 255, b = 0 }, -- Green
[3] = { r = 0, g = 0, b = 255 }, -- Blue
[7] = { r = 127, g = 0, b = 255 }, -- Violet
[17] = { r = 255, g = 165, b = 0 } -- Orange
}
Debug
lua
Config.Debug = true-- console logs and the /race_cams test command; false on a live server
Config.DebugSkipCamera = false-- skip the opening and the countdown, for testing tracks
SUVs (2), Muscle (4)
B (5)
Coupes (3)
C (6)
Sedans (1), Off-road (9), Service (17), Emergency (18), Military (19), Commercial (20), Trains (21)
Config.VehicleClasses = {
[0] = 7, -- Compacts → D
[7] = 2, -- Super → X-- ...
[22] = 2, -- add this line for open-wheel cars, which the list does not include
}