RR Gym
Walk up to the gym gear already on your map, press E and work out. Every set builds Strength and Stamina, saved per character.
Train on real gym equipment anywhere on the map. Walk up, press E, and your character gets on the bench, lies back and presses, or hangs from the bar and pulls. Every set builds persistent Strength and Stamina, with effects you control in config. An in-game dashboard places equipment in any gym MLO, on the beach or in the prison yard, with no coordinates in config.
Features
- Lines up on the real equipment. rr-gym recognises the gym props it's standing next to (the vanilla bench-press rack, flat bench, chin-up tower and treadmill) and puts the athlete exactly on them, at any angle, wherever the admin stood when placing the spot. The offsets were measured in game, once per model, so they hold for every copy on the map.
- Gets on and off like a person. The bench press starts with the game's own sit-down-and-lie-back clip and ends with the sit-up-and-stand clip. Chin-ups, push-ups and sit-ups have their own get-in and get-out too. Each one is played from an origin worked out so the movement finishes on the mark, not a step off it. After the treadmill you step off the back.
- Nothing drifts. The athlete is held on the mark for the whole set, so a lying or hanging pose can't slide off the equipment, and nobody ends a set stuck inside a bench.
- 8 exercises: bench press, chin-ups, barbell curls, dumbbell curls, push-ups, sit-ups, treadmill, yoga.
- Props in the right hands. The bench bar sits across both hands like the game's own scenario, the curl bar spans the grip, and there's one dumbbell in each palm. All are spawned by the script, tracked in one registry and deleted when the set ends. A watchdog cleans up after a death, a ped swap, or another script clearing your tasks.
- Rep speed matches the motion. Each clip knows how many reps it contains, and playback is scaled so one rep on screen is one rep on the counter.
- No minigame. Press E and you work out. Reps tick by on their own and the
set ends when it's done (
Config.Set.reps, default 10). Press X any time to stop early and keep the reps you did. - You can't get stuck. An independent failsafe listens for X / BACKSPACE /
ESC and hard-stops a set that overruns, even if the workout loop has died.
/gymstopfrees a stuck player without restarting anything. - Configurable effects. Strength can drive melee damage and climb speed,
with a melee damage bonus in config. Stamina can drive sprint duration
(optional run-speed multiplier). Yoga relieves stress. Tune or turn any of
them off in
Config.Effects. - Progression with limits: diminishing returns, a daily fatigue cap, and slow decay if you skip the gym. All configurable.
- Muscle Beach ready on first start. Ten stations on the vanilla outdoor gear at Vespucci Beach (three benches, both chin-up towers, curls, dumbbells, push-ups, sit-ups, yoga) are placed for you on a fresh install, so the city has a working gym before anyone opens the admin menu.
- Admin placement (
/gymadminor/gymplace). Stand at the equipment, press E, and the set starts right away so you can see it. If it needs a nudge, the tuner is already open: arrows, ENTER, done. - Player dashboard (
/fitness): stats, daily fatigue, workout history, city leaderboard. - HUD-ready. Stats replicate as player statebags (
gymStrength,gymStamina) any HUD can read. Server and client exports included. - Server-authoritative. Gains are validated server-side (rep rate and distance checks) and stored in MySQL per citizenid.
Dependencies
- ox_lib
- oxmysql
- Qbox (
qbx_core), or QBCore (qb-core) through the framework bridge. SetConfig.Framework.
Install
- Drop
rr-gyminto your resources andensure rr-gymafter ox_lib, oxmysql and your core. - Tables create themselves on first start, and an existing 1.0 install is
upgraded in place.
sql/install.sqlis included if you'd rather import by hand. - Start the server. On a fresh install Muscle Beach (Vespucci Beach) is set up
by itself, ten stations. Already have spots? Run
gympreset Muscle Beachin the server console to add it; it skips anything already there. - More gyms: in game as admin,
/gymadmin→ Add Equipment, or/gymplace bench My Gym.
Commands
| Command | Who | What |
|---|---|---|
/fitness | everyone | Fitness dashboard (stats / history / leaderboard) |
/gymadmin | admin ACE (Config.AdminAce) | Placement & management dashboard |
/gymplace <equipment> [gym name] | admin ACE | Place a spot without opening the dashboard |
/gymped | admin ACE | Line the athlete up on the equipment. Run it mid-set. |
/gymprop | admin ACE | Line a held prop up in the hand. Run it mid-set. |
/gymwhere | everyone | Prints what the nearest spot snaps onto and where the athlete will go (F8) |
/gymanim | everyone | Checks every configured clip actually plays (F8) |
/gymstop | everyone | Escape hatch: ends a workout and frees your character |
gympreset <name> | server console or admin ACE | Adds a ready-made gym from Config.Presets (Muscle Beach), skipping spots already there |
Config.AdminAcemust be an ACE, not a principal. Qbox's default permissions already includeadd_ace group.admin admin allow, so admins work out of the box. On other setups, add that line or point the config at an ACE you already grant (for examplecommand).
Placing equipment
/gymadmin→ pick the exercise and the gym name → Place, or just/gymplace bench Muscle Beach.- Stand at the equipment, facing the way the athlete should face, and press E.
- The set starts straight away:
- Known equipment (vanilla gym props, or anything you've added to an
exercise's
anchors): it snaps on by itself. Check it and press ENTER. - Anything else (MLO benches that are part of the building): line the athlete up with the arrows, PgUp/PgDn for height, 1/2 to turn, then ENTER. That spot remembers it.
- Known equipment (vanilla gym props, or anything you've added to an
exercise's
Ticking Spawn prop places a bench, rack, mat or treadmill with the spot, for gyms outside an MLO. Spawned props are known models, so they line up on their own.
Lining up the athlete — /gymped
Start a set, run /gymped, nudge, ENTER. What it saves depends on what the set is lined up against:
- Snapped to a known model: saved for that model, so every copy of it on
the server is fixed at once (
rr_gym_model_offsets). - No known model: saved for that one spot (
rr_gym_spots.ped_*).
The matching config line is printed to F8 if you'd rather bake it in.
Adding your MLO's equipment
If your gym MLO uses its own bench or rack models, add them to the exercise's anchors in config.lua:
anchors = {
{ model = 'my_mlo_bench', offset = vec3(0.0, 0.0, -0.19), heading = 180.0, exit = vec3(0.95, 0.0, 0.0) },
},
Some gear is baked into the map as static geometry rather than spawned as an object (most of Muscle Beach), so nothing can find it by scanning. List those in Config.KnownProps with their model, position and heading; Muscle Beach is already there.
If it's a copy of a vanilla prop, reuse the vanilla numbers. Otherwise start with any numbers, run a set on one, line it up with /gymped, and ENTER saves it for every copy. /gymwhere tells you whether a spot found it.
Lining a prop up in the hand — /gymprop
- Start a set.
- Run
/gymprop. - Arrows move X/Y · PgUp/PgDn move Z · 1-2 yaw, 3-4 pitch, 5-6 roll · hold SHIFT for bigger steps · TAB cycles props.
- ENTER saves, BACKSPACE cancels.
Saved offsets go to rr_gym_prop_offsets and apply to everyone from then on, with no restart. The hold = { … } block is printed to F8 as well.
To go back to config values for one exercise (or everything), call the rr-gym:server:admin:resetOffsets callback with an equipment key, or none.
Reading the stats from other resources
-- client
local stats = exports['rr-gym']:GetStats() -- { strength, stamina }
local str = LocalPlayer.state.gymStrength -- statebag (any resource)
-- server
local row = exports['rr-gym']:GetPlayerFitness(src) -- full stats row
local str = Player(src).state.gymStrength
Other resources that use gym props
Sit scripts and other workout scripts often register the vanilla gym benches too. If one of them reacts to the same E press, players get both at once. Take the prop_muscle_bench_* models out of that script's list where rr-gym spots are placed.
Last updated 2026-10-25
Browse scripts