[DarkRP][GameRoom] Racing (GTA:O Style)

You can use script event in config file.
For example.

ESX = nil
TriggerEvent("esx:getSharedObject", function(obj) ESX = obj end)
event.tryPayment = function(source, price, minplayer) -- Make player pay bet if can and join game or awlay true if you wan't.
	if minplayer == 1 then
		event.showNotification(source, "Free to play")
		return true
	local xPlayer = ESX.GetPlayerFromId(source)
	local money = xPlayer.getMoney()

	if money > 0 and money >= price then
		return true
		event.showNotification(source, "No money.")
		return false
event.giveReward = function(source, money, rank) -- give money to player when win race
	local xPlayer = ESX.GetPlayerFromId(source)

	if rank == 1 then
	elseif rank == 2 then
	elseif rank == 3 then
1 Like

So a few questions:
1.Which framework is this best suited too?
2. Continued support and updates?
3. Custom support if we ask?

Also have you just the normal tracks for racing and the transform series?

Cheers in advance

  • It stanlond script i test in vrp and esx, you can see event function in screenshot for decision.
  • If you find issue i will update to fix, If there are feture comments I will make.
  • Other tracks is in DLC, Free is normal tracks.


I use ESX Legacy, I have 3 problems:

  1. The game starts when there are only 2 and the other people are left without entering the game
  2. Sometimes the rooms do not appear, and when you recreate them they are created twice
  3. When you finish the race, it doesn’t tether you back to the starting point. You stay at the end of the race and you can see the race maps

Please dm me.

A few suggestions:

  1. Could you please change or make it configarable so that we can have a generic pic or background colour like soft black, or grey and the top bar instead of blue, maybe grey or black.

Don’t get me wrong, the pic is great if playing Bowling, but this is racing orientated!

  1. At end screen is says Rank, so how do we introduce a rank system, that shows after the race, in the winners pic etc?

  2. Is there a way we can create a Race Playlist?

  3. Anyway to show race results, or/and keep a record of them, maybe a way to save them to website

  4. Also i noticed so far on a few tracks, there is traffic about and some obviusly weird traffic if the road is suddenly has a prop on it, maybe a call to no traffic when racing or summin?

  5. A custom Nameplate, great credit to you for your number plate, but would be nice to have a choice of car plate?

  6. i see that it says within various places to use keyboard letter R, thats great but I use a controller, so secondry keybinding for me is ( Y Controller) so maybe just a note someone that users can change it. I also think somewhere on start race pic, its shows it as R.

  7. Could we please change the text that says “Game Room” to something more generic that would appeal to racing and maybe something like oh I don’t know but even a way that is configurable to each persons needs, like for me its Racing only. As it also shows on may as “Game Room” with what looks like a drunk pacman. lol

  8. Is there a reason it says “Create Room” instead of “Create Race” or “Start Race”

  9. players can choose which car, from a class (Like pick 1 of 10 cars from class sports) etc

Also I feel the script is very limited as you are tied to one car per class, with what ever race track you choose) That’s no fun unfortunately so please to new users please be aware, as I didn’t realise this.

Most of you suggestions already in config.

  • vehicle plate can change in ‘./config/client/function.lua’ SetVehicleNumberPlateText()
  • you can use MySql racing to display record in website.
  • Npc randon spawn you can use event handle
AddEventHandler("DarkRP_Racing:BeginRace", function()
AddEventHandler("DarkRP_Racing:Finished", function()
  • Game Room menu you can change in ArenaLobby

No idea how that’s done, thats why I asked

Please explain in simple terms what that is in refernce too?

What’s that for please explain clearly?

Thanks for the response from some suggestions.

So am I right to assume that in fact we are not free to choose any car, from a selected class to go with a race?

That in fact each race map is tied to one car no matter what the class?

Are you referring to changing the HTML manually?

you got it right, opensource file.

You can change class car in config, but now player can’t select car to play.

Dam, Ok that’s not good for me.

Can you let me know why this is, or is it summin that cannot be done with this script?

There most be a reason why you cannot used any car in any class per say (Per map).

Actually I can.
There may be an update in the future.

1 Like

Can you start these races with just yourself 1 player?

Yes, set minimum player in server config.

Hey, i’ve done this,
But the race still doesnt start.

Nevermind all is good, works well.
Love this script, brings the best parts of GTA Online to FiveM!

1 Like


  • Custom track support .xml format is Map Editor, Object Spooner, Menyoo, ymap
  • Support DarkRP_XP rank system, display rank menu, xp reward.
  • Config custom vehicel class.
  • Config key for respawn to checkpoint.
  • Menu class vehicle select list.
  • Menu random vehicle per lap.
  • Better spectate mode.

Video Tutorial: DarkRP Racing Custom Map Tutorial - YouTube

Awesome Updates
Highly recommend this script. The guy that developed it is fantastic, adding and tweaking things and is a great help when needed.