function getPlayerMaxCap(cid)
local capacity =
{
[0] = {base = 100, gain = 5}, -- Calculated for level 1 // I'm unsure about this, base might not be right, so correct it, if it's wrong.
[1] = {base = 135, gain = 5}, -- Calculated for level 8
[2] = {base = 135, gain = 5}, -- Calculated for level 8
[3] = {base = 135, gain = 10}, -- Calculated for level 8
[4] = {base = 135, gain = 15}, -- Calculated for level 8
[5] = {base = 135, gain = 5}, -- Calculated for level 8
[6] = {base = 135, gain = 5}, -- Calculated for level 8
[7] = {base = 135, gain = 10}, -- Calculated for level 8
[8] = {base = 135, gain = 15} -- Calculated for level 8
}
if getPlayerVocation ~= 0 then
if getPlayerLevel(cid) > 8 then
maxCap = (capacity[getPlayerVocation(cid)].base + ((getPlayerLevel(cid) -8) * capacity[getPlayerVocation(cid)].gain))
else
maxCap = capacity[getPlayerVocation(cid)].base
end
elseif getPlayerVocation(cid) == 0 then
if getPlayerLevel(cid) > 1 then
maxCap = (capacity[getPlayerVocation(cid)].base + ((getPlayerLevel(cid) -1) * capacity[getPlayerVocation(cid)].gain))
else
maxCap = capacity[getPlayerVocation(cid)].base
end
end
return maxCap
end