With the permission of @del1an,I’m releasing this script.
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 --
-- --
-- ################################### --
-- show/hide component
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 = false, -- Enables/Disables The Race Mode HUD
RaceMode2 = false, -- Enables/Disables The Race Mode HUD 2, only if the Race Mode is false
RaceMode3 = true, -- Enables/Disables The Race Mode HUD 3, only if the Race Mode and RaceMode2 are false - NEW
SeatBelt = true, -- Enables/Disables The seatbelt option (default key K) - NEW
Indicators = true, -- Enables/Disables The indicators option - 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 or Race Mode2 or RaceMode3
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 seatbeltkey = 311 -- K
local EngineHpBroken = 110
local EngineHpAlmostBroken = 370
local BodyHpBroken = 50
-- Don't touch this
local cruisecolor = false
local carspeed = nil
local speedBuffer = {}
local velBuffer = {}
local beltOn = false
local wasInCar = false
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, Gears, both Race Modes, Indicators, Seatbelt.
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 all Race Modes if you want.
- You can move only one race mode 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.
- When you open the bigmap the carhud doens’t hide (something that i’m looking into resolving).
Have some examples of how it looks in various situations
-
Everything is ok
-
Almost Broken
-
Broken
-
1.2 Update
-
1.3 Update (Race Mode)
-
1.4 Update (Race Mode 2)
-
1.6 Update (Race Mode 3)
-
1.7 Update (Plane and Heli HUD)
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.
- The indicators script itself is not included in this one.
- If you hit something or lose speed it will turn red.
Change Log:
V.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).
V.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.
V.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).
V.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.
V.1.5
- Now you only see Race Mode in cars.
- Now you onlt see Race Mode 2 in cars.
- Some stuff changed in the code to make it easier to use.
- That is it for now.
V.1.6
- Alot of clean up on the code to make it better.
- Now you can only see the hud if you’re in a car (bicycles and bikes can too, it will be fixed soon).
- Now you can only see the hud if you’re in the driver seat.
- Seatbelt script added into the code, you put the seatbelt by pressing K, if you don’t have the seatbelt you can be launched out of the car.
- The passenger only will see the seatbelt and RaceModes if activated.
- Hud for the indicators added (you will need a script to make the indicators work.
- Race Mode 3 added to the hud.
- The new Race Mode 3 has a healt bar.
- The new Race Mode 3 has a tyre warning.
- The new Race Mode 3 has a engine warning.
- The new Race Mode 3 has a body hp warning.
- The new Race Mode 3 has a transmisson warning.
- The new Race Mode 3 has some stuff from Race Mode 2.
- If you’re going in reverse the tail ligths change color in Race Mode 3.
V.1.7
- Little Clean up in the code.
- Added Plane HUD.
- Added Heli HUD.
V.1.8
- HUD bug disappearing fixed.
- Rotors turning green after being destroyed fixed.
V.1.9
- Cruise Control not turnning green or red when needed fixed.
- Tests done to the Text of cruise control and everything worked.
- Cruise Control text now turns green at low speeds.
- Cruise Control text no turns red when you press F9 again.
DownLoad:
V.1.9carhud1.9.rar (7.4 KB)
V.1.8carhud1.8.rar (7.4 KB)
V.1.7carhud1.7.rar (7.4 KB)
V.1.6carhud1.6.rar (6.9 KB)
V.1.5carhud1.5.rar (5.0 KB)
V.1.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