[Release] Timetrials - Standalone Races and Leaderboard [v1.00]

About

This FiveM resource adds timetrials races with the following features:

  • Leaderboard for each race (server side scores)
  • Configurable races and interface
  • Checkpoints and finish line
  • GPS waypoint navigation
  • Chat notification when race is completed
  • Teleport to waypoint (L key when not racing)
  • Reset race (L key when racing)
  • Freeze player movement during countdown
  • Map blips
  • more

Download

Changes

Demo

Using realistic handling and speed mods

Preview Images


Credit

Related Resources

27 Likes

Cool, been looking for decent MP race mode for some time.

i have the map blips, i have the yellow circle, but nothing happensā€¦ am i supposed to teleport out of map as i expected to just drive into circle and press a keyboard button to start race as shown in video

Nice, Iā€™m gonna check this out now.

Looks pretty good damn sweet!

Looks like itā€™s an issue when first starting the resource, I probably missed it when using restart to debug stuff. I fixed it and tried everything from scratch, should be good now.

1 Like

Good shit. I have to ask though, what ā€˜speed modā€™ are you using :)?

Thanks Brent-- all working fine now after your fixā€¦ super releaseā€¦ Thanks

1 Like

The main mod used is Realistic Driving V. I have some other mods as well, Iā€™m working on releasing a collection of realistic driving mods.

Looks really cool man but, why donā€™t you add a pvp mode? Which means, competitive! Racing with other players would be fun asf!

Kallock,

I just released the driving mods Iā€™ve been using if you want to check them out [Release] RealisticVehicles - Realistic vehicle handling, speed, and more [v1.10]

Hello!
The first thing is to congratulate you for your great work Brent_Peterson. Above all, the Nurburgring-Nordschleife circuit is impressive. :heart_eyes:
I would like to ask you some things about Timetrials.
-How can I set the time records at the checkpoint so that 1st, 2nd, 3rd ā€¦? I only get the fastest time, the rest of time does not show me.
-How can I do to show me the name of the car instead of ā€œNULLā€?
-Could I change the format of the times to minutes, seconds and thousandths?

Thank you!

Thank you, hopefully below helps answer some of your questions.

  • The leaderboard is designed to show the top one time for each car and the driver who set it, try setting a time with a different car and it should show up. The idea is that itā€™s mainly to compare car performance but drivers also get credit for setting that time (otherwise it would be top 100 times all supercars :wink: ). You would need to modify the code if you wanted to save more scores for the same car or anything else.
  • Is this an add-on car? If it is youā€™ll need to make sure you set the name string as detailed here. Iā€™ll probably change it to grab the short name if NULL whenever I go back and make changes.
  • You can modify the part of the code the draws the time to screen, havenā€™t tried it but changing line 220 to something like this might work, similar for scores just mess around with it.
local raceTimeSeconds = (GetGameTimer() - raceState.startTime) / 1000
local raceTimeMinutes = math.floor(raceTimeSeconds/60)
raceTimeSeconds = raceTimeSeconds - 60*raceTimeMinutes 
DrawHudText(("%f:%2.3f"):format(raceTimeMinutes, raceTimeSeconds), RACING_HUD_COLOR, 0.015, 0.725, 0.7, 0.7)
1 Like

NULL, are probably mod vehicles

idea for you:

  • add a way so that 2 player can drag at the same time
  • add GO after 3 2 1 ā€¦
  • add a sound on the 3 2 1 GOā€¦
  • add the possibility to be neutral while waiting and to be able to mount the compression of the engine ā€¦ (by giving gas)

and with modded vehicles I also have the NULL problem in the leaderboard

great share thx;)

1 Like

The directions in this post should fix it, all the add-on vehicles work fine for me Can someone clarify vehicle_names.lua hash question for me?

1 Like

So I donā€™t really get it. The " * Teleport to waypoint (L key when not racing) " function is just teleporting you around the map when not racing? So itā€™s Teleport to waypoint right? If this is the case will anything happen if I remove it? I didnā€™t try this release yet but it sounds cool. Correct me if I said anything wrong. Thanks!

2 Likes

Thanks for the quick reply!
I have tried what you have told me with good results.

  • The names of the cars I have solved creating a vehicle_names.lua as a script and solved!
  • The different positions may not work because all the cars registered as NULL because they do not have a name. Solved when implementing the names in vehicle_names.lua.
  • The time format changed well but with some more zeros
    timer
    Any idea how to leave just one number or none until it reaches the minute?

And a question I have: Are the times saved in the file or directory? (In case some time is not valid I could erase it)

Thank you!

I already found the file scores.txt where it saves the times.
I would like to know if I can eliminate the zeros as indicated in the previous post.
Could you give me an idea Brent_Peterson?

Thank you!

You need to play with the printf formatting to change how it prints to the screen, maybe something like this instead?

("%02d:%02.3f"):format(raceTimeMinutes, raceTimeSeconds)

http://www.cplusplus.com/reference/cstdio/printf/

2 Likes