[Release] CarHud Modified and Better Looking (V.1.4) (Now with Race Mode and Race Mode 2) (New Update)

roleplay
fivem
cars
fivem-scripts
server

#1

With the permission of @Deli,I’m releasing this script.

Permission

I have this scripts for some time now, but untill yesterday I started looking at his code and doing some changes to it, and making it more easy to use.

The config is the same thing with some extras

New Config
--- ################################### --
--									   --
--        C   O   N   F   I   G        --
--									   --
-- ################################### --

-- NOTE: The Cruise Control script it self its not here only the text fuction

-- show/hide compoent
local HUD = {
	
	Speed 			= 'kmh', -- kmh or mph

	DamageSystem 	= false, 

	SpeedIndicator 	= true,

	ParkIndicator 	= false,

	Top 			= true,  -- ALL TOP PANAL ( oil, dsc, plate, fluid, ac )

	Plate 			= false, -- only if Top is false and you want to keep Plate Number
	
	Engine			= true,  -- Engine Status off/on
	
	Cruise			= true,  -- Enables/Disables The CRUISE Control status (default key F9)
	
	CarRPM			= true,  -- Enables/Disables The RPM status of the car
	
	CarGears		= true,  -- Enables/Disables The status of the gears of the car
	
	RaceMode		= true,  -- Enables/Disable The Race Mode HUD (NEW)

}

-- Move the entire UI
local UI = { 

	x =  0.000 ,	-- Base Screen Coords 	+ 	 x
	y = -0.001 ,	-- Base Screen Coords 	+ 	-y

}

-- Move the entire Race Mode
local RM = { 

	x =  0.000 ,	-- Base Screen Coords 	+ 	 x
	y = -0.001 ,	-- Base Screen Coords 	+ 	-y

}

-- Change this if you want
local cruisekey = 56 -- F9
local EngineHpBroken = 110
local EngineHpAlmostBroken = 370

-- Don't touch this
local cruisecolor = false
local carspeed = nil

And the rest of the code is easy to modified too, only in the parts that i added, in this case the Engine, Cruise Control, RPM, Gear and both Race Modes part.

What have i added?

  • Default Key for cruise control (You can change it in the config)
  • Values for Engine Health so you can decide better when its red and when its yellow.
  • You can turn on or off the cruise and engine parts if you want.
  • You can turn on or off the RPM and Gear parts if you want.
  • You can turn on or off the Race Mode part if you want.
  • You can turn on or off the Race Mode 2 part if you want.
  • You can move only the race mode if you want and not the entire hud.
  • You can move only the race mode 2 if you want and not the entire hud.

Cons

  • The cruise control scripts its not inside this, you have to use another one and with that you have to change the default key and all of that. I recommend ToastyCruiseControl, very easy to use.
  • The new update (Race Mode) doens’t detect if the car is a 2 seater or 4 seater.

Have some examples of how it looks in various situations

  • Everything is ok
    Ligado%26Bom

  • Almost Broken
    Ligado%26QuasePartido

  • Broken
    Desligado%26Partido

  • 1.2 Update
    carhud(rmp%26gear)

  • 1.3 Update (Race Mode)
    3

  • 1.4 Update (Race Mode 2)
    4%20(2)

Notes:

  • The CruiseControl only works if you’re over of a certain speed and if you press F9.
  • And it stops working if you hit S and if go down of a certain speed.
  • If you hit something or lose speed it will turn red.

Change Log:

  • 1.1

    • Now if you hit something or someone the cruise text turns red.
    • Now if you lose speed, like in the cruise control, the cruise text turns red.
    • The values of speed when its stays red or green are different(easy to edit it back).
    • SpaceBar removed. Now the text doens’t turn red when you hit the spacebar(easy to edit it back).
  • 1.2 (Special thanks to @Cheleber )

    • Now you have RPM values above the speed indicator.
    • Now you have gears that you can enable and disable.
    • Changed some stuff on the code itself to work better.
  • 1.3 (Special Thanks to @ezy for the two lines of code that saved me)

    • Race Mode added to the hud.
    • You can enable or disable the Race Mode.
    • You can now see wich vehicle seats are occupied.
    • You can now see the damage of the headlights of the vehicle.
    • Some changes to the old code itself to make it more easier to use.
    • You can now see the damage of the tyres of the vehicle (Has different phases).
    • You can now see the damage of the doors of the vehicle (Has different phases).
    • You can move only the Race Mode if you want and the rest of the HUD separately.
    • You can now see the damage of the bumpers of the vehicle (Has different phases).
    • You can now see the damage of the engine too of the vehicle (Has different phases).
    • You can now see the damage of the transmission of the vehicle (Has different phases).
  • 1.4 Race Mode 2 added to the hud.

    • Changed the headligths on the Race Mode
    • You can see the state of the headlights, low beams or high beams.
    • Some changes to the old code itself to make it more easier to use.
    • You can now see the damage of the hood of the vehicle if you lose it.
    • You can now see the damage of the trunk of the vehicle if you lose it.
    • You can enable or disable the Race Mode 2 only if Race Mode is disabled.
    • You can now see the damage of the headlights of the vehicle like Race Mode.
    • You can now see the damage of the doors of the vehicle (Has different phases).
    • You can now see the damage of each window, including windshield and back window.
    • You can now see the damage of the bumpers of the vehicle (Has different phases).
    • You can now see the damage of the engine too of the vehicle (Has different phases).
    • You can move only the Race Mode 2 if you want and the rest of the HUD separately.

DownLoad:
V1.4carhudV.1.4.rar (4.9 KB)
V1.3carhud1.3.rar (4.1 KB)
V1.2carhud1.2.rar (2.7 KB)
V1.1carhud1.1.rar (2.3 KB)
V1.0carhud.rar (2.2 KB)

How to install it:

  • Just drag and drop the folder into the resources folder
  • Add start carhud to your server.cfg
  • Clear the cache and start the server

#2

Awesome work man! Cant wait to put in this new version.


#3

@Harrison_M
Thank you sir! xD


#4

I Love it can u make it where it shows mph and km/h


#5

Thanks sir!
Sorry dind’t understand xD


#6

Like this


#7

Did you understand now!!!
:sneezing_face:


#8

At the same time? Ok its easy


#9

Looks Good :smiley: Keep up the Good Work!


#10

Thank you alot sir! XD


#11

Would you like to do one like this?
Sem%20t%C3%ADtulo


#12

@davinte
Well that one looks nice


#13

Working great

Capturar1


#14

@David_Carneiro are able to make the “CRUISE” where lets say If i press Y it turns on and I HAVE to press Y again to turn it OFF.
Edit: nvm I might be able to do something eles


#15

Ok if you need help just tell me then xD


#16

@David_Carneiro alright so I made the cruiser key to 246 = Y (same key as to active my cruiser mode) But I have to dubble press Y for the cruiser color to change
How can I make them work tougher…

-Game_Time


#17

@game_time
Where did you change the key? in the value of the local? and you have to press to times? weird, did you change anything else in the code?
I will be adding that in the next update where you can use same key not done yet sorry :confused:


#18

Hey mate everything works great,
could you make an if statement if vehicle speed is less than 30kph cruise = off


#19

Sure let me get on my pc xD


#20

With this Script :stuck_out_tongue:
Do the Fuel System there, come with it, or what Resource is it? :slight_smile: