> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fenixstudios.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Fnx PVP HUD

> Complete installation and configuration reference for fnx-pvp-hud.

> Complete installation and configuration reference for fnx-pvp-hud.

`fnx-pvp-hud` displays player health, armor, server ID, and optional server logos.

## First installation

```cfg theme={null}
ensure community_bridge
ensure fnx-pvp-panel
ensure fnx-pvp-hud
```

This resource does not use a database. You do not need to import an SQL file.

## First setup

Edit `settings/public/client/cfg.lua`, choose the visible elements, set their positions, and replace the example logo. Restart the resource after saving.

HUD positions are resolved by the NUI from the config. Supported anchors are `top-left`, `top-center`, `top-right`, `center-left`, `center`, `center-right`, `bottom-left`, `bottom-center`, and `bottom-right`; every block also supports an `{ x, y }` offset.

## Client configuration

### Main settings

| Key                            | Type    | Default | Explanation                                                                        |
| ------------------------------ | ------- | ------- | ---------------------------------------------------------------------------------- |
| `ClientCfg.Hud.enabled`        | boolean | `true`  | Master switch. When false, no HUD section is displayed.                            |
| `ClientCfg.Hud.updateInterval` | number  | `250`   | Milliseconds between value updates. Lower values update faster but run more often. |

### Vitals

| Key                               | Type    | Default         | Explanation                                    |
| --------------------------------- | ------- | --------------- | ---------------------------------------------- |
| `ClientCfg.Hud.vitals.enabled`    | boolean | `true`          | Shows the complete vitals block.               |
| `ClientCfg.Hud.vitals.position`   | string  | `"bottom-left"` | Screen anchor used by the vitals block.        |
| `ClientCfg.Hud.vitals.offset.x`   | number  | `24`            | Horizontal distance in pixels from the anchor. |
| `ClientCfg.Hud.vitals.offset.y`   | number  | `24`            | Vertical distance in pixels from the anchor.   |
| `ClientCfg.Hud.vitals.showId`     | boolean | `true`          | Displays the player's server ID.               |
| `ClientCfg.Hud.vitals.showHealth` | boolean | `true`          | Displays health.                               |
| `ClientCfg.Hud.vitals.showArmor`  | boolean | `true`          | Displays armor.                                |

### Corner logo

| Key                           | Type            | Default       | Explanation                                                                                 |
| ----------------------------- | --------------- | ------------- | ------------------------------------------------------------------------------------------- |
| `ClientCfg.Hud.logo.enabled`  | boolean         | `false`       | Enables the corner logo.                                                                    |
| `ClientCfg.Hud.logo.position` | string          | `"top-right"` | Screen anchor used by this logo.                                                            |
| `ClientCfg.Hud.logo.offset.x` | number          | `24`          | Horizontal offset in pixels.                                                                |
| `ClientCfg.Hud.logo.offset.y` | number          | `24`          | Vertical offset in pixels.                                                                  |
| `ClientCfg.Hud.logo.text`     | string          | `"FENIX"`     | Text used when no image is configured.                                                      |
| `ClientCfg.Hud.logo.image`    | string or `nil` | `nil`         | Optional image source. Leave nil to use `text`; local assets must be accessible to the NUI. |
| `ClientCfg.Hud.logo.width`    | number          | `104`         | Logo width in pixels.                                                                       |
| `ClientCfg.Hud.logo.height`   | number          | `42`          | Logo height in pixels.                                                                      |

### Center logo

| Key                                 | Type            | Default        | Explanation                                   |
| ----------------------------------- | --------------- | -------------- | --------------------------------------------- |
| `ClientCfg.Hud.centerLogo.enabled`  | boolean         | `false`        | Enables the separate center logo.             |
| `ClientCfg.Hud.centerLogo.position` | string          | `"top-center"` | Screen anchor used by the center logo.        |
| `ClientCfg.Hud.centerLogo.offset.x` | number          | `0`            | Horizontal offset in pixels.                  |
| `ClientCfg.Hud.centerLogo.offset.y` | number          | `24`           | Vertical offset in pixels.                    |
| `ClientCfg.Hud.centerLogo.text`     | string          | `"FENIX"`      | Fallback text when `image` is nil.            |
| `ClientCfg.Hud.centerLogo.image`    | string or `nil` | `nil`          | Optional center-logo image source.            |
| `ClientCfg.Hud.centerLogo.width`    | number          | `140`          | Logo width in pixels.                         |
| `ClientCfg.Hud.centerLogo.height`   | number          | `54`           | Logo height in pixels.                        |
| `ClientCfg.Hud.centerLogo.opacity`  | number          | `0.18`         | Opacity from `0` (invisible) to `1` (opaque). |

## Server configuration

This resource has no `settings/public/server/cfg.lua`.

## Shared files

The private shared file initializes internal values. It has no customer-facing keys.

## Theme system

Colors are CSS strings. Hex values require `#`; transparent colors can use `rgba()`. Radii are pixels and fonts are CSS font-family lists.

| Key                                    | Default                  | Explanation                   |
| -------------------------------------- | ------------------------ | ----------------------------- |
| `ClientCfg.Theme.colors.panelBg`       | `#0b0b10`                | Main HUD background.          |
| `ClientCfg.Theme.colors.panelBgStrong` | `#070709`                | Darker background variant.    |
| `ClientCfg.Theme.colors.accent`        | `#f97316`                | Primary highlight.            |
| `ClientCfg.Theme.colors.accentStrong`  | `#fb923c`                | Strong active highlight.      |
| `ClientCfg.Theme.colors.text`          | `#f5f5f5`                | Primary text.                 |
| `ClientCfg.Theme.colors.mutedText`     | `rgba(245,245,245,0.62)` | Secondary text.               |
| `ClientCfg.Theme.colors.surface`       | `rgba(10,10,10,0.78)`    | Standard internal surface.    |
| `ClientCfg.Theme.colors.surfaceStrong` | `rgba(10,10,10,0.94)`    | More opaque internal surface. |
| `ClientCfg.Theme.colors.border`        | `rgba(255,255,255,0.10)` | Borders and separators.       |
| `ClientCfg.Theme.colors.danger`        | `#ef4444`                | Health or danger accent.      |
| `ClientCfg.Theme.colors.armor`         | `#60a5fa`                | Armor accent and meter.       |
| `ClientCfg.Theme.radii.card`           | `8`                      | Card radius in pixels.        |
| `ClientCfg.Theme.radii.control`        | `8`                      | Control radius in pixels.     |
| `ClientCfg.Theme.radii.pill`           | `999`                    | Fully rounded pill radius.    |
| `ClientCfg.Theme.fonts.body`           | `Space Grotesk...`       | Normal-text font stack.       |
| `ClientCfg.Theme.fonts.display`        | `Bebas Neue...`          | Heading font stack.           |

## Developer info

The current public client file exposes no exports or public events. Configure the HUD through `ClientCfg.Hud`; direct NUI messages are internal.

## Common issues

### Nothing is visible

Check the start order, `ClientCfg.Hud.enabled`, and the individual section's `enabled` key.

### The logo displays text

`image` is nil by default. Supply a valid NUI-accessible image; otherwise `text` is used.

### A block is outside the screen

Restore the default position and offsets, then test custom values on multiple aspect ratios.

### Updates are delayed

Reduce `updateInterval` moderately. Extremely low values create unnecessary client work.

### Theme changes are ignored

Restart the resource and confirm every CSS color is a quoted Lua string with a valid format.

## Common folders

| Path                             | What it is for                                                                       |
| -------------------------------- | ------------------------------------------------------------------------------------ |
| `fxmanifest.lua`                 | FiveM manifest. It loads the resource files in the correct order.                    |
| `settings/public/client/cfg.lua` | Client settings that server owners are expected to edit.                             |
| `settings/public/server/cfg.lua` | Server settings that server owners are expected to edit.                             |
| `settings/private/**/_cfg.lua`   | Internal/default settings. Do not edit unless you are modifying the resource itself. |
| `client/public/*.lua`            | Public client API files and safe integration files.                                  |
| `client/private/*.lua`           | Internal client runtime code.                                                        |
| `server/public/*.lua`            | Public server API files and exports.                                                 |
| `server/private/*.lua`           | Internal server runtime code.                                                        |
| `shared/public/*.lua`            | Shared public data or integration constants.                                         |
| `shared/private/*.lua`           | Shared internal helpers loaded by the resource.                                      |
| `locales/*.json`                 | Locales for ui and game.                                                             |
| `web/dist/`                      | Built NUI files used in-game. Do not edit these by hand.                             |

```txt theme={null}
fnx-pvp-hud/
|-- client/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- main.lua
|-- locales/
|   \-- *.json
|-- settings/
|   |-- private/
|   |   \-- client/
|   |       \-- _cfg.lua
|   \-- public/
|       \-- client/
|           \-- cfg.lua
|-- shared/
|   \-- private/
|       \-- _main.lua
|-- web/
|   \-- dist/
\-- fxmanifest.lua
```
