# DXS Fps Menu

<figure><img src="/files/VHIQL1DwA3oXd34prJ70" alt=""><figcaption></figcaption></figure>

### Dependencies

Minimum:

* FiveM server (FXServer)

Optional integrations:

* ESX (v1 / v2) – for identifying players and storing runtime data.
* QBCore – for persistent metadata storage of player settings.

The resource auto‑detects ESX and QBCore if they are running. If neither is found, it still works using basic identifiers.

***

### Installation

1. Copy the folder:
   * Place `DXS_FpsMenu` in your server resources, for example:
     * `resources/[dxs]/DXS_FpsMenu`
2. Ensure the resource in your `server.cfg`:

   ```cfg
   ensure DXS_FpsMenu
   ```
3. Make sure it starts **after** your framework resources (if any), e.g.:

   ```cfg
   ensure es_extended
   ensure qb-core
   ensure DXS_FpsMenu
   ```
4. Restart the server.

***

### Usage

#### Opening the menu

* Chat command:

  ```
  /fpsmenu
  ```

  This uses the command `fpsmenu` directly.
* Keybind:
  * Default: `F10`
  * Registered as the command `fpsmenu`.
  * Players can change the key in FiveM keybind settings (Settings → Key Bindings → FiveM section).

#### Controls inside the menu

* **FPS SETTINGS**:
  * Use sliders and toggles, then click **APPLY CHANGES**.
  * Settings are applied client‑side every frame and also saved on the server.
* **PERFORMANCE STATS**:
  * Updates every second while the menu is open.
  * Values are visual indicators; CPU/GPU/Memory are estimated from your selected quality levels.
* **QUICK OPTIONS**:
  * Show FPS Counter – small FPS box at top‑right of the screen.
  * Hide HUD – hides HUD and radar during gameplay.
  * Enhanced Mode – applies additional visual/performance adjustments.
  * Boost Mode – further reduces density and visual load for maximum FPS.
  * Press **APPLY CHANGES** to commit.
* **CLEAR CACHE**:
  * Clears timecycle modifiers / HD area / weather override on the client.

#### Language switching

* Top‑right language pills:
  * `EN` – English
  * `FR` – French
  * `ES` – Spanish
  * `AR` – Arabic
* Language switches instantly for all labels in the menu.

***

### Configuration

#### Server‑side config (debug)

In `server/main.lua` there is a small config:

```lua
local Config = {
    Debug = false
}
```

Set `Debug = true` to print debug messages when settings are saved/loaded.

#### Framework notes

* **QBCore**:
  * Settings saved in `PlayerData.metadata["dsx_fpsmenu"]`.
  * Persist across reconnects and server restarts (as long as metadata is saved).
* **ESX**:
  * Settings stored in memory via `xPlayer.set("dsx_fpsmenu", settings)`.
  * Persist only for the current session by default (no DB modifications required).

***

### Files overview

* `fxmanifest.lua` – resource manifest.
* `client/main.lua` – client logic, NUI control, FPS overlay, world tuning.
* `server/main.lua` – framework detection, per‑player settings, ping broadcast.
* `html/index.html` – NUI layout for FPS menu.
* `html/styles.css` – styling/animations for the interface.
* `html/app.js` – front‑end logic, language system, presets, NUI messaging.

***

### Known limitations

* CPU/GPU/Memory usage in the menu are **visual estimates**, not real hardware readings.
* ESX runtime storage does not persist across full server restart unless you extend it to use your own database fields.

***

### Support / Customization

* You can freely change colors, fonts, and layout in `html/styles.css`.
* Logic for presets, languages, and quick options is in `html/app.js`.
* World density and performance tuning behavior is in `client/main.lua` (function `applyWorldSettings`).

If you need help integrating deeper with your ESX/QBCore database or changing defaults (presets, keybind, etc.), you can extend the scripts or ask your developer to adjust the referenced files.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dxs-scripts.gitbook.io/home/documentation/fivem/dxs-fps-menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
