rlDevelopment
  • ๐Ÿ‘‹Introduction
  • ๐ŸงพResources
    • โ•rl_requirements
      • ๐Ÿ“œExports
    • ๐Ÿƒโ€โ™‚๏ธrl_skills
      • ๐Ÿ’ปClient Exports
      • ๐Ÿ’ปServer Exports
Powered by GitBook
On this page
  • exports["rl_skills"]:OpenMenu()
  • exports["rl_skills"]:GetSkillData(Skillname)
  1. Resources
  2. rl_skills

Client Exports

Here u will find some useful client export examples

exports["rl_skills"]:OpenMenu()

  • You can use this export to open the menu from like your radial menu.

exports["rl_skills"]:GetSkillData(Skillname)

Required values:

These values are examples, adapt them to what you need!

  • SkillName ("driving")

This will return the skill data for given skill.

// Example Usage
local ProgbarTime = 0
local SkillData = exports["rl_skills"]:GetSkillData("gathering")
if SkillData ~= nil then
  for Key, Value in pairs(rlConfig.GatheringLevels) do 
      if SkillData.Level == Key then
         ProgbarTime = Value["Progbar"]
      end
   end
end

This exports will return a table of values, below you will find the values that will get returned.

local SkillData = exports["rl_skills"]:GetSkillData(Source, "driving)
print(SkillData.Name, SkillData.XP, SkillData.XPAfter, SkillData.Level, SkillData.ReqXP)

Config: make sure if you make a config for a skill, every level has it`s own table.

// Example Config
rlConfig.GatheringLevels = {
    [0] = {
        ["Progbar"] = 10000,
        ["Amount"] = {1, 2},
        ["Chance"] = 5,
        ["XP"] = {5, 25}
    },
    [2] = {
        ["Progbar"] = 10000,
        ["Amount"] = {1, 2},
        ["Chance"] = 5,
        ["XP"] = {5, 25}
    },
}
Previousrl_skillsNextServer Exports

Last updated 1 year ago

๐Ÿงพ
๐Ÿƒโ€โ™‚๏ธ
๐Ÿ’ป