Files
community_bridge/modules/skills/_default/client.lua
T

25 lines
831 B
Lua
Raw Normal View History

---@diagnostic disable: duplicate-set-field
2025-04-28 09:17:43 -04:00
Skills = Skills or {}
---This will get the name of the Skills system being being used.
---@return string
2025-04-28 09:17:43 -04:00
Skills.GetResourceName = function()
2025-06-19 15:25:35 -04:00
return "community_bridge"
2025-04-28 09:17:43 -04:00
end
2025-06-19 15:25:35 -04:00
---This will get the skill level of the passed skill name. (returns 1 if not found)
---@param skillName string
---@return number
2025-04-28 09:17:43 -04:00
Skills.GetSkillLevel = function(skillName)
2025-06-19 15:25:35 -04:00
if not skillName then return 0 end
local plyrSkills = Framework.GetPlayerMetaData("community_bridge_skills")
if not plyrSkills or not plyrSkills[skillName] then return 1 end
return plyrSkills[skillName].level or 1
end
2025-06-19 15:25:35 -04:00
-- RegisterCommand("getfishingLevel", function(source, args)
-- local level = Skills.GetSkillLevel("fishing")
-- print("Client Fishing Level issssssssss " .. level)
-- end, false)
return Skills