π οΈConfiguration
This document describes all configuration options for the DevHub Gym resource.
Shared Configuration (configs/shared.lua)
configs/shared.lua)Debug Configuration
Controls debug output for the gym system.
Shared.Debug = {
Enabled = true, -- Set to false to disable all debug prints
Levels = {
Info = true, -- General information
Success = true, -- Success operations
Warning = true -- Warning and potential issues
}
}Enabled: Enables/disables all debug prints.
Levels: Controls specific debug message types.
DevHub Skill Tree Integration
Enable or disable integration with the DevHub Skill Tree system.
DevhubSkillTreeEnabled: Set to
trueto use the skill tree system.
Exercises Configuration
Defines all available gym stations and their properties.
uid: Unique identifier for the exercise type.
maxReps: Maximum repetitions per session.
placeOnTheGround: Whether to place the prop on the ground.
propName: The prop model name.
propCoords: World coordinates for the prop.
playerCoords: Where the player stands during the exercise (optional, required for some exercises).
dontSpawnProp: (Optional) If set to
true, the prop will not be spawned, but the target interaction will remain active, allowing players to still perform the exercise.
Client Configuration (configs/client.lua)
configs/client.lua)Blip Configuration
Controls the map blip for the gym.
sprite: Blip icon.
scale: Blip size.
color: Blip color.
name: Blip label.
coords: Blip coordinates.
enabled: Show/hide the blip.
Force Stop Key
Defines the key used to interrupt an ongoing exercise manually.
ForceStopKey: The key code to cancel an exercise session. Common values include:
200= ESC177= BACKSPACE73= X
Use FiveM key mapping reference to customize.
Player StateBag
LocalPlayer.state.gymExercise
LocalPlayer.state.gymExerciseIndicates whether the player is currently performing a gym activity.
Type:
booleanDefault:
falseDescription:
trueβ the player is currently doing an exercise.falseβ the player is not exercising.
Usage: This state can be checked to block certain actions during training or to trigger animations/UI elements.
Reference: FiveM State Bags Documentation
Minigames
Defines the available minigames and their settings for each difficulty.
settings: Each minigame has settings for
easy,medium, andharddifficulties.
Exercise Types
Maps each exercise to its minigames and skill tree XP rewards.
minigames: List of minigame IDs for the exercise.
skillTrees: XP rewards for each skill tree.
Prop Spawn Distance
Controls how far from the player props will spawn.
Props Menu Offset
Offsets for the weight selection menu for each prop model.
key: Prop model hash.
value: Offset vector for menu display.
Weight Boosts
Defines XP and difficulty scaling for different weights.
skillUid: Skill required to use this weight (or
falsefor no requirement).boost: XP multiplier for the weight.
difficulty: Minigame difficulty for the weight.
Server Configuration (configs/server.lua)
configs/server.lua)XP System Integration
Awards XP to players after completing exercises if the skill tree system is enabled.
AddXP: (Optional) Function to add XP to a player, using the skill tree system if enabled.
Exercise Flow
Player approaches a gym prop (e.g., kettlebell, punch bag).
Minigame starts based on exercise type and weight.
Player completes reps; XP is calculated and awarded.
Skill tree integration (if enabled) grants XP to the appropriate skill.
Customization
Add or remove exercises in
shared.lua.Adjust minigame settings and difficulties in
client.lua.Integrate with other systems by modifying the XP function in
server.lua.Adjust prop spawn distance and menu offsets as needed.
Last updated