> For the complete documentation index, see [llms.txt](https://rtx-dev.gitbook.io/rtxdev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rtx-dev.gitbook.io/rtxdev/rtx-realistic-gym-system/overview.md).

# Overview

### 🏋️ A Complete Gym Experience for FiveM

👉 **Purchase on Tebex:** <https://rtx.tebex.io/package/7659349>

{% embed url="<https://www.youtube.com/watch?v=V2Z1GrD5ACA>" %}

## What is RTX Realistic Gym System?

Gyms your players build in game, buy, run and make money from. Every machine has its own exercise with its own minigame, its own animations and its own camera angles — and stats that stay with the player and change what he can do in the world.

## Standalone & Framework Support

* **ESX** — legacy and current
* **QBCore**
* **Qbox** — select `qbcore`, the QB-Core bridge is on by default
* **Standalone** — no framework at all
* Anything else — money, inventory and jobs are three functions in `server/other.lua`, open source

## Gym Types

* **For sale** — a player buys it and runs it
* **City** — the city runs it, nobody owns it
* **Free** — nobody pays anything

A gym can also be kept for certain jobs, locked by its owner, or put on opening hours.

## In-Game Gym Creator

`/gymcreator`. No coordinates to write by hand.

* Place the front desk, the office, the supplement counter and the reception ped by walking to them
* Place every machine with a gizmo or by looking at the spot
* Pick the reception ped model and its idle from a dropdown, with a live preview
* Set entry price, pass prices and opening hours
* Test the gym as a player and come straight back to the creator
* Everything saved to the database, and exportable back into a config file with one console command

## Core Gym Features

* **25 exercises** across six kinds of minigame — press, lift, tempo, cardio, bag and hold
* **Custom animations made for this script**, with the machine's own prop animation and the weights in the player's hands
* **Switchable cinematic cameras** on every machine, one key while training
* **Five stats** — strength, condition, lung capacity, combat and flexibility — saved to the database, with decay when nobody trains
* **Energy**, a whole-day budget that refills on its own and quietly kills stat farming
* **Stamina**, per machine, so nobody does forty reps in a row
* **Ownable gyms** with a management panel: real visits, real earnings, the money in the till
* **Entry and passes**, and a pass as an item a player can hand to a friend
* **A supplement store** with nine items, and effects on stamina, energy and xp
* **Training outside the gym** — running, swimming, diving, and push ups on the floor with `/workout`
* **Job whitelist** per gym
* **Two custom MLOs included**, with their gyms already built

## Performance & Optimization

* Machine objects are **local and not networked**. Nothing streams a barbell across the server, and nothing is left behind when a player disconnects
* State is carried on **state bags**, not on events firing at everybody
* Every loop sleeps when there is nothing near the player — the prompt, the markers, the scanner and the sync all back off on their own
* Energy and stat decay are **not counted on a timer**. They are worked out from the last time they changed, whenever somebody asks, so nothing runs for players who are not there
* The world scanner forgets a machine nobody has seen for five minutes

## Developer Friendly

* **19 client exports** and **37 server exports**
* Events you can rename or switch off, in one file
* Your own stat system instead of ours, with one setting and one event
* Adding a stat, a supplement, a machine or an activity is a config block and one branch — nothing else has to be touched
* `client/other.lua` and `server/other.lua` ship **unencrypted**, and so does every config except the machine models

## Need Help?

[**Join our Discord**](https://discord.gg/P6KdaDpgAk)
