Skill creation
to create a skill go to garrysmod\addons\elevels_[version]\lua\elv\skills
there you will find all current skills
by adding another folder to this file it will automatically load upon restart
WARNING! the file must begin with sh_
WARNING! remember to change the names everywhere!
this is the skill template:
// Script made by Eve Haddox
// discord evehaddox
// values
local cat = "Physical"
local name = "Your Skill"
// adding skill (don't touch)
elv.config.skills[cat] = elv.config.skills[cat] or {}
elv.config.skills[cat][name] = {}
local tbl = elv.config.skills[cat][name]
// linking with config
eve.config:addValue("eLevels", "YOURSKILLMultiplayer", name .." Per Level", 2, "int", "server", 3, "Skills")
eve.config:addValue("eLevels", "YOURSKILLMax", name, 50, "advInt", "server", 1, "Max Upgrades", function() end, 100)
eve.config:addValue("eLevels", "YOURSKILLPrestige", name, 0, "advInt", "server", 1, "Prestige Requirement", function() end, 100)
// the skill
tbl.func = function(ply, amt)
ply:SetMaxArmor(100 + amt * eve.config:GetValue("eLevels", "YOURSKILLMultiplayer"))
end
tbl.max = function()
return eve.config:GetValue("eLevels", "YOURSKILLMax")
end
tbl.prestige = function()
return eve.config:GetValue("eLevels", "YOURSKILLPrestige")
end
tbl.display = function(amt)
return tostring(amt * eve.config:GetValue("eLevels", "YOURSKILLMultiplayer")) .." / ".. tostring(eve.config:GetValue("eLevels", "YOURSKILLMax") * eve.config:GetValue("eLevels", "YOURSKILLMultiplayer")) .."%"
end