GYM Exports
This page explains the available GYM exports and how to use them correctly in your scripts or commands.
GYM Exports Usage
You can use the following exports to manage player gym stats dynamically:
Add Gym Stat
exports['nproblem-boxing-lib']:addGymStat(playerId, amount)Description: Increases the player's gym stat by the specified amount.
Parameters:
playerId(number): The ID of the player.amount(number): How much to increase.
Example:
exports['nproblem-boxing-lib']:addGymStat(1, 10) -- Adds 10 gym stat to player with ID 1
Check Gym Stat
exports['nproblem-boxing-lib']:checkGymStat(playerId)Description: Returns the current gym stat of the specified player.
Parameters:
playerId(number): The ID of the player.
Returns:
(number): Current gym stat value.
Example:
local stat = exports['nproblem-boxing-lib']:checkGymStat(1) print(stat) -- Prints the player's gym stat
Remove Gym Stat
Description: Decreases the player's gym stat by the specified amount.
Parameters:
playerId(number): The ID of the player.amount(number): How much to decrease.
Example:
Last updated