> For the complete documentation index, see [llms.txt](https://energy-fivem.gitbook.io/energy-mlos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://energy-fivem.gitbook.io/energy-mlos/scripts/races-creator.md).

# 🚗 Races Creator

{% embed url="<https://youtu.be/hfQu7LpQDig>" %}

**Energy Races** is a complete, standalone-ready racing resource for FiveM. Players build their own tracks in-game, race against others with a premium tablet interface, and compete on a global ranking — all with **no external map editor** and **no coding** required.

Everything is driven by an elegant NUI (React) tablet and a set of Lua client/server scripts. It works on **Standalone, ESX, QBCore, QBOX and vRP** out of the box.

{% hint style="success" %}
**Zero-config start:** install the resource, `ensure` it, and open the menu. The database installs itself and the framework is auto-detected.
{% endhint %}

### What can players do?

* **Create races in the world** — drive the track, drop checkpoints, place props and decorations, then publish. No `.ymap`, no external tools.
* **Three race modes** — Classic (laps or point-to-point), Drift (live scoring) and Drag 1v1 (with a synchronized start light-tree).
* **Race with style** — animated 3D checkpoint gates, a Forza-style 3D route trail on the ground, per-player checkpoint & interface colors, and an in-race YouTube music player.
* **Bet & compete** — cash bets or even bet your own vehicle, then climb the global ranking and see full post-race results.

### Feature highlights

| Area               | Highlights                                                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| **Track creation** | In-world editor, 3D checkpoint gates or DUI designs, prop & decoration placement with a free-fly gizmo, multi-lap return routes |
| **Race modes**     | Classic, Drift (scoring), Drag 1v1 (light-tree)                                                                                 |
| **Visuals**        | 3D route trail (ribbon), 3D checkpoint cards, custom colors, entry markers                                                      |
| **Music**          | YouTube playlists per race, in-race player controlled by rebindable keys                                                        |
| **Economy**        | Cash betting, vehicle betting, entry fees, rewards                                                                              |
| **Social**         | Player profiles, global ranking, groups/teams                                                                                   |
| **Ops**            | Discord webhook logs, admin permissions, self-installing database                                                               |
| **Languages**      | 8 languages (pt-br, en, fr, es, de, it, zh, th)                                                                                 |
| **Frameworks**     | Standalone, ESX, QBCore, QBOX, vRP (auto-detected)                                                                              |

### How the resource is organized

| Folder             | Purpose                                                              |
| ------------------ | -------------------------------------------------------------------- |
| `client/`          | Client scripts — editor, checkpoints, HUD, race logic, NUI bridge    |
| `server/`          | Server logic — database, races, lobby, betting, ranking, logs, music |
| `shared/`          | Shared code — config helpers, framework bridge, constants            |
| `web/`             | The NUI (React/TypeScript, built with Vite into `web/dist`)          |
| `config.lua`       | All server-side settings — see the Configuration reference           |
| `translations.lua` | All UI text, in 8 languages                                          |

### Where to go next

* New to the script? Start with **Installation**.
* Want to build a track? Read **Creating a Race**.
* Tuning the server? Open the **config.lua Reference**.
* Integrating with your framework or scripts? See **Open Client Functions** and the **Framework Bridge**.
