[Release] Additional vehicle speedometer [alpha version]

Hi there, mates!

Today i introduce you additional vehicle speedometer (as you can see from topic header, lol)
Its drawed up with sprites and in miles per km, because it is U.S. speed measure unit, as i know (but i add km/h for other people who want to know their speed in this measure unit).

Some credits

All sources taken from public (speedometer texture from google, except from needle, how to know MPH entity speed from nativeDB). Original gradations was replaced by me for kind of synchronization with original FPS speedometer, but some times we have some differences between them - i think (+/-) 1-2 mph is not critical.

Video

Screenshots

Synchronization example with original car speedometer:

Random screenshot:

Original code prewiev

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if IsPedSittingInAnyVehicle(GetPlayerPed(-1)) then
			local vehicle = GetVehiclePedIsIn(GetPlayerPed(-1), false)
			if DoesEntityExist(vehicle) and not IsEntityDead(vehicle) then
				if not HasStreamedTextureDictLoaded("speedo") then
					RequestStreamedTextureDict("speedo", true) -- upload it
					while not HasStreamedTextureDictLoaded("speedo") do
						Wait(0)
					end
				else
					-- everything is ok
					local degree = 0
					local step = 2.05833
					if GetEntitySpeed(vehicle) > 0 then degree=(GetEntitySpeed(vehicle)*2.236936)*step end
					DrawSprite("speedo", "speedom_003", 0.898,0.752,0.16,0.245, 0.0, 255, 255, 255, 255)
					if degree > 247 then degree=247 end
					DrawSprite("speedo", "needle_003", 0.898,0.755,0.116,0.15,43.00001+degree, 255, 255, 255, 200)
					if IsControlPressed(1, 216) then DrawSprite("speedo", "brakeson_001", 0.83,0.815,0.02,0.025, 0.0, 255, 255, 255, 255)
					else DrawSprite("speedo", "brakeson_002", 0.83,0.815,0.02,0.025, 0.0, 255, 255, 255, 255) end
				end
			end
		end
	end
end)

#Versions

By me:
This is first aplha version, maybe i will update this script later with some special hud components.
Download link: in download section below.

Bugs

I repeat, this is aplha version. What does it means? It means some random bugs can be available, so if you find some - write me or made your own update and post it here.

Also

No credis required and you can use it however you want. Sorry for my english, traditionally.
If you want to update this resouce - you’re welcome! Post your version (with comments) here and I`ll add it in this topic with your name.

Links

Download resource: HERE (165 KB)
Unofficial wiki: HERE
My project: HERE
My pastebin: HERE

5 Likes

Well, it doesn’t really work.

https://kanersps.pw/i/379b16

EDIT: It requires a ytd oops

Yes, you have to download whole resource

1 Like

The amazing script works amazingly. Only suggestion is maybe having more speedometer for faster cars that can go over 120mph. maybe a speedometer based on the vehicle type or vehicle. For example, the adder can go over 120mph.

Yeah. I should draw new textures and release it in a few days.

1 Like

@MarkViolla thank you for your hard work and contribution.

1 Like

Hi MarkViolla :relaxed:.

It works fine, but is it possible for you to make an alternative speedometer pic with ** km / h - MPH ** and not as now with ** MPH - km / h ** ? without transparent background.
I have try to open the .ytd file in ‘OpenIV’,without luck :confused:.

Edit: As two different .ytd files so that people can choose km / h or mph…

1 Like

@MarkViolla Would be awesome also is there a way we can get a speedo with higher mph/km maybe different speedos for how fast a car can go like some cars go well above 120 most can go a bit over 200.

and @MarkViolla would be nice to see this also https://github.com/IncoCode/EngineOverheat-GTA5 engine overheating

It would give the cars a lot more depth and realism.

1 Like

Ok. Got it.
Wait for next release

Okayy… Very fine :relaxed:

Yes, top speed based on car and also version with only kmph would be great.
You can use GetVehicleMaxSpeed(vehicleModel)

hello i have this bug when i had delete the mod you see how fix that ? because now i have a big white square ^^

1 Like

Hello, can you make a version with a .ytd file without MPH ?
Or a way we can specified which one we want ?

I have the same error, how to do this ?

Hello, When I desactivate the script i have this :

any idea?

1 Like

Hello, here is a video to show you how to Improve this speedometer :slight_smile: (In French)

1 Like

Hello I would like to remove the speedo but when I remove it there is a mark blacnhe instead what to do?

delete your cache! :slight_smile:

Hello I know and that’s what I did but it always seems to do

Useful, excellent. Thank you.

1 Like