Or you could have just turned off the fuel text in carhud and moved the text from your fuel script into place. Then it’s more accurate to your fuel script
Everything you need is in the source code, read through it and it should be easy to add
-- Draw fuel gauge; always displays 100 but can be modified by setting currentFuel with an API call
currentFuel = GetVehicleFuelLevel(vehicle)
fuelColor = (currentFuel >= fuelWarnLimit) and fuelColorOver or fuelColorUnder
drawTxt(("%.3d"):format(math.ceil(currentFuel)), 2, fuelColor, 0.8, screenPosX + 0.050, screenPosY + 0.000)
drawTxt("FUEL", 2, fuelColorText, 0.4, screenPosX + 0.080, screenPosY + 0.020)
I’m releasing resources as I make them and updating as necessary, I’ve made it easy for developers to integrate but if you want a copy-paste resource then I plan to update it eventually just no ETA
-- Display information only when in vehicle
if (IsPedInAnyVehicle(player, false)) then
-- Get vehicle speed and draw speedometer
local speed = GetEntitySpeed(GetVehiclePedIsIn(player, false))*3.6
speedColor = (speed >= speedLimit) and speedColorOver or speedColorUnder
drawTxt(("%.3d"):format(math.ceil(speed)), 2, speedColor, 0.9, screenPosX, screenPosY)
drawTxt("KMH", 2, speedColorText, 0.4, screenPosX + 0.035, screenPosY + 0.024)
I only have Kmh and the street label working the fuel and the belt arent working can someone help?
also how can i re-size the font for “KMH numbers and fuel” they are too big
There is a post above here that helped me with the fuel not working. Very easy fix.
I also had problems with my seatbelt, and it turned out it was conflicting with esx_personmeny’s seatbelt script. Hope that helps!
On line 37, change the local currentFuel = 100.0 to local currentFuel = 0.0 (Assuming you’re using LegacyFuel)
I had to completely remove my other seatbelt scripts to get it working. I also had an indicator one which made the SimpleCarHUD one not work. But the SimpleCarHUD indicator next to the map works fine so it isn’t a big loss to remove the others.