Server-Side

Server Exports

Below are all the useful exports that you can use in other resources, be sure to read their descriptions.


getSkill

Checking how much a player currently has skill

-- @param {skill_name: string}: Registered skill name for example 'condition'
local skill = exports["vms_gym"]:getSkill(source, skill_name)

addSkill

Add a skill value to a player by specifying the skill name and value

-- @param {skill_name: string}: Registered skill name for example 'condition'
-- @param {value: number}: Value to add for example 10.0
exports["vms_gym"]:addSkill(source, skill_name, value)

removeSkill

Remove the skill value to a player by specifying the skill name and value

-- @param {skill_name: string}: Registered skill name for example 'condition'
-- @param {value: number}: Value to remove for example 10.0
exports["vms_gym"]:removeSkill(source, skill_name, value)

Server Events

Below are all the useful events that you can use in other resources, be sure to read their descriptions.


vms_gym:runStrengthBooster

An event for use, for example, with the steroids item. When this event is triggered, the player will have boosted point acquisition at the gym during strength exercises.

-- @param {multiplier: number}: For example: 3.0
-- @param {duration: number}: Duration in ms of strength booster - for example 360000
TriggerClientEvent('vms_gym:runStrengthBooster', src, multiplier, duration)

vms_gym:runConditionBooster

An event for use, for example, with the protein item. When this event is triggered, the player will have boosted point acquisition while running, for example, on a treadmill.

-- @param {multiplier: number}: For example: 4.0
-- @param {duration: number}: Duration in ms of condition booster - for example 360000
TriggerClientEvent('vms_gym:runConditionBooster', src, multiplier, duration)

Last updated