[H@mer][GameRoom] Racing (GTA:O Style) + Map Creator

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
	end
	
	local xPlayer = ESX.GetPlayerFromId(source)
	local money = xPlayer.getMoney()

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

	if rank == 1 then
		xPlayer.addMoney(money*4)
	elseif rank == 2 then
		xPlayer.addMoney(money*3)
	elseif rank == 3 then
		xPlayer.addMoney(money*2)
	else
		xPlayer.addMoney(money)
	end
end
2 Likes

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.

DLC

1 Like

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.

1 Like

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
1 Like

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.

1 Like

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

1 Like

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.

2 Likes

Can you start these races with just yourself 1 player?

Yes, set minimum player in server config.

1 Like

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

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

1 Like

Update 2.0.0

  • 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

1 Like

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

Update 2.1.2

  • All DLC need to be update too.
  • Support 8 split way.
  • Fix deadloop.
  • Fix spectator mode flashing screen.
  • Wait map loaded before player Ready.
  • Display all checkpoint in spectator mode.

Config.Debug = true

  • Make sure FiveM client is “Beta Channel” in setting to use more dev command.
  • Skip all cutscene
  • Test map 1-test will enable
    image
1 Like

What does that mean?

If you mean like Checkpoint paths? when user has option of lets say left or right on a course where there are 2 checkpoints placed, they can choose either one!

If that’s the case when I am creating my own map with check points how would I register, lets say 2 checkpoints at same place as one…