Size can be edited in the hud.css file
My design on the server
Do you share it?
No, never in my life.
changing the properties of #container does nothing.
EDIT: decided to resize each div style to fit my needs. Really couldn’t figure out why the parent style does nothing.
hud.html i changed under canvas UNITDISPLAY to MPH from KMH and it worked for me hope this helps.
this is due to everything having its own size/right.
I easily resized it by using this
#container {
display: none;
zoom: 0.5;
-moz-transform: scale(0.5);
}
Yes it works good job
Is there a way to use this in standard single player?
is there a way i can change it from khm to mph
Love u so much dude, i tried so long!
Is there a way to put the whole thing in the middle bottom of the screen?
Good day @Akkariin,
I have noticed that the script still runs when the player is not in a vehicle.
Code to resolve the issue.
Citizen.CreateThread(function()
while true do
Wait(1)
playerPed = GetPlayerPed(-1)
if IsPedInAnyVehicle(playerPed) then
if playerPed and not isHide then
playerCar = GetVehiclePedIsIn(playerPed, false)
if playerCar and GetPedInVehicleSeat(playerCar, -1) == playerPed then
carRPM = GetVehicleCurrentRpm(playerCar)
carSpeed = GetEntitySpeed(playerCar)
carGear = GetVehicleCurrentGear(playerCar)
carIL = GetVehicleIndicatorLights(playerCar)
carHandbrake = GetVehicleHandbrake(playerCar)
carBrakePressure = GetVehicleWheelBrakePressure(playerCar, 0)
carLS_r, carLS_o, carLS_h = GetVehicleLightsState(playerCar)
SendNUIMessage({
ShowHud = true,
CurrentCarRPM = carRPM,
CurrentCarGear = carGear,
CurrentCarSpeed = carSpeed,
CurrentCarKmh = math.ceil(carSpeed * 3.6),
CurrentCarMph = math.ceil(carSpeed * 2.236936),
CurrentCarIL = carIL,
CurrentCarHandbrake = carHandbrake,
CurrentCarBrake = carBrakePressure,
CurrentCarLS_r = carLS_r,
CurrentCarLS_o = carLS_o,
CurrentCarLS_h = carLS_h,
PlayerID = GetPlayerServerId(GetPlayerIndex())
})
else
SendNUIMessage({HideHud = true})
end
end
end
end
end)
After adding a simple if statement to determine if the player is in a vehicle the scripts runtime decreases.
I already made a pull request on the you’re Github.
Have a nice day!
Hello,
I have noticed a small error i had made. After the UI is displayed on the screen it does not remove the UI once a player is out of a vehicle. I resolved this by placing else and sending a NUI message to hide the HUD.
I went ahead and pushed another request through Github.
Thank you,
1NF1N17Y#5646
Thanks, I updated the code manually because there have some conflicts that need to be resolved
I realized a mistake i made once uploaded it, i saw you did the same to fix the issue by simply adding a wait.
Anyways love the work you have done!
Hi guys, I am running this on local fiveM server and it is shuttering for me for some reason, I do not know why, other speedometers that I have tried worked fine.