Skip to content

Add speed text and headlight status icon to speedometer - #733

Open
DateFTP wants to merge 1 commit into
multitheftauto:masterfrom
DateFTP:feature/speedometer-speed-text-and-headlight-icon
Open

Add speed text and headlight status icon to speedometer#733
DateFTP wants to merge 1 commit into
multitheftauto:masterfrom
DateFTP:feature/speedometer-speed-text-and-headlight-icon

Conversation

@DateFTP

@DateFTP DateFTP commented Aug 4, 2026

Copy link
Copy Markdown

Type: Feature

Summary
Enhances the [gameplay]/speedometer resource with two additions:

  • A digital speed text showing the current vehicle speed in km/h, displayed on the gauge.
  • A headlight status icon that shows whether the vehicle lights are on or off. When getVehicleOverrideLights returns automatic mode, the icon falls back to the current time of day (day: off, night: on).

Changes

  • client.lua: added dxDrawRelText helper, getElementSpeed helper, the speed value drawing and the headlight icon logic inside drawSpeedo.
  • meta.xml: registered the two new image files.
  • images/lights_0.png and images/lights_1.png: new off/on headlight icons.

Tested

  • Entering/exiting vehicles, the speed text and icon appear and disappear correctly.
  • Headlight override on/off/auto states and the automatic day/night fallback.

- Show the current vehicle speed as km/h text on the gauge
- Add headlight on/off icons (lights_0/lights_1) reflecting the
  current headlight state, falling back to the time of day when
  lights are in automatic mode
@DateFTP

DateFTP commented Aug 4, 2026

Copy link
Copy Markdown
Author
image

@DateFTP

DateFTP commented Aug 4, 2026

Copy link
Copy Markdown
Author
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant