# LGF HUD

> LGF HUD delivers a clean, minimalist interface inspired by modern FiveM roleplay servers. It supports QBCore out of the box and can be customised through configuration files and CSS variables.

## Overview

The package replaces the default `qb-hud` with a flexible UI that shows player vitals, voice status, weapon info, and vehicle metrics. It is responsive, meaning it scales correctly on different resolutions and works with both keyboard and controller setups.

## Feature Highlights

- Toggleable panels for health, armour, stress, hunger, and thirst
- Vehicle HUD with speedometer, RPM, gear indicator, seatbelt, and cruise control status
- Notification anchors compatible with ps-ui, okokNotify, or qb-core alerts
- Integrated compass and street name display using FiveM natives
- Built-in settings menu for players to adjust opacity, scaling, and visibility

## Installation Steps

1. Download the LGF HUD resource and extract it to `resources/[qb]/lgf-hud`.
2. Remove or disable `qb-hud` to avoid duplicate overlays (`ensure qb-hud` should be commented out).
3. Add `ensure lgf-hud` to `server.cfg` after core dependencies:

   ```cfg
   ensure qb-core
   ensure qb-target
   ensure lgf-hud
   ```

4. Copy the configuration file (usually `config.lua`) into your server and adjust the options described below.
5. Restart the server and verify that the HUD appears when a player joins.

## Configuration Overview

- `Config.UseStress`: Enable/disable stress bar support if your server does not use stress mechanics.
- `Config.VehicleHud`: Toggle vehicle overlay elements individually (RPM, minimap styling, seatbelt reminders).
- `Config.VoiceModes`: Define labels and colours for different voice ranges (whisper, normal, shout).
- `Config.ColourScheme`: Set CSS variables for bars, gradients, and fonts to match your branding.
- `Config.FrameworkExports`: Adjust function names if you run a fork of QBCore or custom voice script.

After editing configuration files, run `refresh` or restart the resource to apply changes.

## Integration Tips

- Pair LGF HUD with a voice script like `pma-voice` for accurate voice indicators.
- Use the provided exports to toggle specific UI elements when a player enters menus or minigames.
- Update status checks if you use custom metadata names for hunger/thirst (e.g., `needs_hunger`).
- Replace the minimap styling with your own CSS by editing `html/css/app.css`.

## Troubleshooting

| Issue | Resolution |
|-------|------------|
| HUD does not appear | Confirm `lgf-hud` is started and no other HUD resource is running. Check the F8 console for JavaScript errors. |
| Hunger/thirst bars remain empty | Ensure your status script updates the metadata keys referenced in `Config.StatusKeys`. |
| Vehicle HUD flickers | Disable conflicting resources that manipulate the minimap or speedometer (e.g., legacy `seatbelt` scripts). |
| Settings do not save | Verify the resource has permission to write to its JSON settings file or check if you disabled local storage in the browser NUI. |

## Additional Resources

- Review the README bundled with LGF HUD for update notes and screenshots.
- Join the author's Discord for skin packs, fonts, or language packs released by the community.
- Explore other HUDs in our [HUD catalog](/hud) to compare design styles.
