# ESX | Gym \[PAID]

<figure><img src="/files/WrJmZYJeYNXq1DMHQ88v" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This script is a working gym script with the requirement of a Membership card to be able to work out with many exercises that consist of:

* Weights, Treadmills, Pushups, Chinups, Yoga & Situps.
  {% endhint %}

<figure><img src="/files/DFHJUGMsoanVW7HQYe8v" alt=""><figcaption></figcaption></figure>

* <mark style="color:orange;">Stress toggle.</mark>
* <mark style="color:orange;">Strength toggle.</mark>
* <mark style="color:orange;">Ped Model & coordinates/heading.</mark>
* <mark style="color:orange;">Blip settings (coords/sprite/scale/display/color/shortrange).</mark>
* <mark style="color:orange;">Gym Membership & cost prices.</mark>
* <mark style="color:orange;">Water & cost prices.</mark>
* <mark style="color:orange;">Option to add your own coordinates/prop name for each workout, if you have custom ones.</mark>

> /stats

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

<figure><img src="/files/LhinZZRSRrF3cHV4BUcL" alt=""><figcaption></figcaption></figure>

* This resource is drag/drop. You will just need to add the following inside of your server.cfg after you've dropped the file into your resources.

> <mark style="color:orange;">ensure adminplus-gym</mark>

{% hint style="danger" %}
Make sure to run the .sql file.
{% endhint %}

{% hint style="warning" %}
Feel free to check the config.lua & customize the options to your needs.
{% endhint %}

```lua
Config = {}

Config.ESX = 'es_extended'

-- If you have stress system integrated into esx_status, then enable to true to remove stress when doing workouts.

-- if you disable this, disable UseStress & UseStrength
Config.EnableBuiltInStatus = true
--(removes stress when working out)--
Config.UseStress = true
--(gives you strength)
Config.UseStrength = true

-- not yet implemented
--[[
function SkillExport(skill, amount)
    if type == 'weights' then
        exports["gamz-skillsystem"]:UpdateSkill(skill, amount)
    end
    if type == 'treadmills' then
        exports["gamz-skillsystem"]:UpdateSkill(skill, amount)
    end
    if type == 'pushup' then
        exports["gamz-skillsystem"]:UpdateSkill(skill, amount)
    end
    if type == 'chinups' then
        exports["gamz-skillsystem"]:UpdateSkill(skill, amount)
    end
    if type == 'yoga' then
        exports["gamz-skillsystem"]:UpdateSkill(skill, amount)
    end
    if type == 'situps' then
        exports["gamz-skillsystem"]:UpdateSkill(skill, amount)
    end
end
]]

Config.Locale = GetConvar('esx:locale', 'en')

Config.PedModels = {
    {
        Model = 'a_f_y_fitness_01',
        Coords = vector3(-1255.36, -355.12, 36.01),
        Heading = 307.19
    },
    -- LA Fitness
    -- {
    --    Model = 'a_f_y_fitness_02',
    --    Coords = vector3(258.30, -271.67, 52.96),
    --    Heading = 339.63
    -- },
    -- Add more peds settings as needed
}

Config.BlipSettings = {
    {
        Pos = {x = -1255.36, y = -355.12, z = 36.95},
        Sprite = 126, 
        Display = 4, 
        Scale = 0.7, 
        Colour = 5, 
        ShortRange = true
    },
    -- LA Fitness
    -- {
    --    Pos = {x = 258.06, y = -271.57, z = 53.96},
    --    Sprite = 126, 
    --    Display = 4, 
    --    Scale = 0.7, 
    --    Colour = 5, 
    --    ShortRange = true
    -- },
    -- Add more blip settings as needed
}

-- do you use ox_inventory? -- metadata
Config.OxInventory = false

-- free to change item name.
Config.GymMembershipItem = 'gym_membership'

Config.GymMembershipPrice = 50
Config.WaterPrice = 1

-- cooldowns (30000 = 30s)
Config.SitupsCooldown = 30000
Config.WeightsCooldown = 30000
Config.TreadmillCooldown = 30000
Config.PushupsCooldown = 30000
Config.ChinsupCooldown = 30000
Config.YogaCooldown = 30000

Config.Treadmills = {
    `apa_p_apdlc_treadmill_s`
}

Config.Weights = {
    `prop_weight_squat`, `prop_barbell_02`, `prop_curl_bar_01`, `prop_barbell_60kg`, `prop_weight_rack_02`
}

--if you need to add your own treadmill coordinates
Config.TreadmillsCoords = {
    -- LA fitness coords
}

--if you need to add your own weight coordinates
Config.WeightsCoords = {
    -- LA fitness coords
    -- vec3(254.53, -268.46, 59.91),
    -- vec3(238.80, -269.66, 59.91)
}

Config.Pushups = {
    vec3(-1265.9210, -355.9389, 36.9596),
    -- LA fitness coords
    -- vec3(244.12, -262.44, 60.32),
    -- vec3(246.56, -263.26, 60.32)
}

Config.Chinups = {
    vec3(-1258.8064, -355.6531, 36.9596),
    vec3(-1257.4302, -358.7531, 36.9596),
    -- LA fitness coords
    -- vec3(249.27, -268.50, 59.91),
    -- vec3(250.72, -266.69, 59.91)
}

Config.Yoga = {
    vec3(-1262.4193, -360.9603, 36.9948),
    -- LA fitness coords
    -- vec3(235.48, -267.76, 60.03),
    -- vec3(234.42, -267.16, 60.03),
    -- vec3(233.18, -267.16, 60.03)
}

Config.Situps = {
    vec3(-1263.2308, -354.0027, 36.9596),
    -- LA fitness coords
    -- vec3(247.48, -260.94, 60.53),
    -- vec3(244.65, -259.99, 60.53),
    -- vec3(242.92, -264.84, 60.53),
    -- vec3(245.74, -265.90, 60.53)
}
```

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

<figure><img src="/files/cSa9GTZM3fGHbSakyouX" alt=""><figcaption></figcaption></figure>

```markup
V 1.0.1
```

* Original Release

```
V 1.0.2
```

> Fixed prices showing up the right amount when third eyeing the ped.

> Added LA Fitness Compatibility (map not included).

```
V 1.0.3
```

> Cleaned up code

> Added configuration to change ped coordinates & heading.

> Compiled blip settings w/ blip coordinates in Config.lua

> Fixed "not enough money" showing the wrong amount if you changed the price in Config.lua

```
V 1.0.4
```

> Added all the notifications to locales/en.lua.

> Added gym membership item to config.lua so you can change the item name.

> Removed useless code (not needed).

```
V 1.0.5
```

> Added ox\_inventory option for Metadata support.

<pre><code><strong>⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
</strong></code></pre>

<figure><img src="/files/WB0SEtWXj3hWIdzcgjwN" alt=""><figcaption></figcaption></figure>

> <mark style="color:orange;">ALL gyms including:</mark>
>
> * [<mark style="color:orange;">LA Fitness MLO</mark>](https://www.youtube.com/watch?v=LXm9ix0fF4Y) <mark style="color:orange;">(pre-configured)</mark>
> * [<mark style="color:orange;">Muscle Gym MLO</mark>](https://www.youtube.com/watch?v=bFsO7TXbyDY)
> * [<mark style="color:orange;">Pump & Run MLO</mark>](https://www.gta5-mods.com/maps/mlo-pump-run-gym-add-on-sp-fivem-ragemp) <mark style="color:orange;">(pre-configured)</mark>

<pre><code><strong>⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
</strong></code></pre>

<figure><img src="/files/GICvWvhe7QLANSUPz86h" alt=""><figcaption></figcaption></figure>

* [<mark style="color:yellow;">Forums Post</mark>](https://forum.cfx.re/t/esx-legacy-gym-configurable-props-coordinates/5066235)
* [<mark style="color:yellow;">Showcase (video)</mark>](https://www.youtube.com/watch?v=HMEOjwNiE6c\&t=1s)
* [<mark style="color:yellow;">Tebex (purchase)</mark>](https://adminplus.tebex.io/package/5459622)
* [<mark style="color:yellow;">Support (discord)</mark>](https://discord.gg/J2mP9kJJ83)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adminplus.dev/paid-scripts/esx-or-gym-paid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
