πͺEquipment Setup Guide
TL;DR β Open configs/shared.lua, add a new entry inside Shared.Exercises, restart the resource. Done.
Where to edit
All equipment is configured in a single file:
Shared.Exercises = {
-- your entries go here
}Available exercise UIDs
Each entry must use one of these uid values (defined in Shared.ExercisesTypes):
kettlebellswing
Kettlebell swing
boxing
Punching bag
jumpingbox
Box jumps
overhead
Overhead press (barbell)
backsquat
Back squat (barbell)
raises
Dumbbell raises (large rack)
biceps
Biceps curls (small rack)
treadmill
Treadmill run
Each uid is linked to Shared.ExercisesTypes (minigames + skill tree XP). To add a brand-new exercise type, you must extend Shared.ExercisesTypes and create the matching exercise script in escrowed/exercises/.
Available props (known models)
These models have a default menu offset registered in Config.PropsMenuOffset (configs/client.lua):
devhub_gym_kettlebell_rack
Kettlebells
devhub_gym_punch_bag
Punching bag
devhub_gym_jumping_box
Jump box
devhub_gym_barbell
Barbell β squat
devhub_gym_dumbell2_rack
Large dumbbells
devhub_gym_dumbell1_rack
Small dumbbells
prop_barbell_02
Vanilla GTA barbell β overhead
devhub_gym_treadmill
Treadmill
How to add new equipment (script spawns the prop)
playerCoords is not required for every exercise (e.g. boxing, jumpingbox, treadmill don't use it), but it is recommended for kettlebellswing, overhead, backsquat, raises, biceps.
How to use an EXISTING prop from the map (MLO / IPL)
If the prop already exists in the world and you do not want to spawn a duplicate, set dontSpawnProp = true:
propCoords must match the real position of the in-world prop. The script uses it to place the interaction menu and to position the player.
Full entry options
uid
string
β
Exercise type
maxReps
number
β
Max reps per session
propName
string
β
Prop model name
propCoords
vec4
β
x, y, z, heading
playerCoords
vec4
β
Optional β fixed player position
placeOnTheGround
bool
β
true = snap prop to ground
dontSpawnProp
bool
β
true = use an existing prop from the map
Important rules
Do NOT place multiple entries with the same uid too close to each other. Author note in shared.lua: "dont place the same uid too close to each other".
Config.PropSpawnDistance = 50.0 (max 75.0). Above that limit, props will not load reliably.
Custom prop? Register its menu offset in configs/client.lua β Config.PropsMenuOffset, otherwise the menu may appear inside the model:
Map blips are configured in configs/client.lua β Config.Blips.
Skill Tree XP β if Shared.DevhubSkillTreeEnabled = true, XP rewards are configured in Shared.ExercisesTypes[uid].skillTrees.
Examples
Punching bag attached to a prop that already exists inside an MLO:
A new treadmill that the script will spawn for you:
Forces the player into a fixed spot behind the barbell:
After adding entries, just run restart devhub_gym on the server.
Last updated