grabSkill

This function retrieves data associated with a specified skill. It returns a table containing information about the skill if it exists in the configuration.

Example

local skills = exports.dime_skills
local data = skills:grabSkill('stamina')
--[
    {
        "xp": 2000,
        "level": 10,
        "percent": 33.3,
    }
--]
if data.level >= 3 then
    print('success')
else print('failure') end 

Returns:

  • skill: table The data table for the specified skill. This includes the experience points, current level, and progress percentage of the skill. Fields:

  • xp: number The amount of experience points the player has accumulated for the skill. level: number The current level of the player in the specified skill.

  • percent: number The progress percentage towards the next level in the specified skill. Note: If the specified skill is not configured in Config.skills, the function will return nil.

Last updated