📦Installation

Download the Resource

  • Download the gymsv2 resource package

  • Extract the files to your server's resources directory

File Structure

Verify the resource contains the following files:

  • fxmanifest.lua

  • config.lua

  • configGyms.lua

  • gym/client.lua

  • gym/server.lua

  • punchingmachines/client.lua

  • punchingmachines/server.lua

  • html/

  • stream/

Database Setup

1. Run SQL Migration

Execute the SQL file to create the required database tables and columns:

2. Verify Database Tables

After running the SQL, verify these tables exist:

  • players - Updated with gym_skills and gym_fatigue columns

  • gym_memberships - Stores player membership data

  • gym_punching_scores - Stores punching machine leaderboard data

Add Items to Inventory

Add the following items to your inventory system's item configuration:

Inferno Boxing Gym Items

Gymnasium Items

Pump & Run Gym Items

Add to Server Configuration

1. Add Resource to server.cfg

Open your server.cfg file and add the following line to ensure the resource starts:

2. Configure Dependencies

Ensure the following resources are running before gymsv2

  • TMC Framework Core - Required for framework functions

  • oxmysql or equivalent database resource

Install MLO Maps (Optional)

The script supports multiple gym MLO locations. Install the MLO maps you want to use:

Free Options

After installing an MLO, enable it in configGyms.lua by setting enabled = true for that gym location.

Test the Installation

1. Start the Server

Start your server and verify the resource loads without errors:

2. Join as Player

  • Join your server

  • Navigate to a gym location

  • Verify you see the gym boundary zone message

  • Test entering and exiting the gym

3. Test Membership System

  • Have a gym employee create a membership

  • Verify the membership item appears in inventory

  • Test using gym equipment with the membership

4. Test Punching Machines

  • Go to a gym with punching machines enabled

  • Test the punching minigame

  • Verify scores are saved and displayed on the leaderboard

Permission Configuration

Grant the appropriate permission levels in your permissions system:

  • gymstats - View player gym statistics (Default: god)

  • resetgymstats - Reset player gym statistics (Default: god)

  • setgymstat - Set specific gym stat values (Default: god)

  • setfatigue - Modify player fatigue levels (Default: god)

  • cleanpunchscores - Clean old punching machine scores (Default: god)

Edit these permissions in configGyms.lua:

Commands

The following commands are available after installation:

Admin Commands

  • /gymstats [player_id] - View a player's gym statistics

  • /resetgymstats [player_id] - Reset a player's gym stats to default

  • /setgymstat [player_id] [skill_name] [amount] - Set a specific gym stat value

  • /setfatigue [player_id] [fatigue_type] [amount] - Set player fatigue level

  • /cleanpunchscores - Clean up old punching machine scores from database

Player Commands

Players interact with gyms through in-world zones and prompts - no direct commands are needed for normal gameplay.

Troubleshooting

Resource Won't Start

  • Verify TMC Framework core is loaded first

  • Check console for error messages

  • Ensure all dependencies are installed

Database Errors

  • Verify SQL migration ran successfully

  • Check database connection in your server configuration

  • Ensure proper table permissions

Gym Zones Not Working

  • Verify the gym MLO is installed and loaded

  • Check configGyms.lua has correct coordinates

  • Ensure the gym is set to enabled = true

Membership Items Not Working

  • Verify items are added to your inventory system

  • Check item images are in the correct directory

  • Ensure item names match between config and inventory

Next Steps

Once installation is complete, proceed to the Configurationarrow-up-right section to customize gym locations, equipment, skill progression, and more.

Last updated