Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getLevel(ply) --returns a player level
- local level = 0
- local xp = ply:GetXP()
- for k, v in ipairs(Level) do
- //print(k .. ":" .. v)
- if(xp >= v) and ply:IsValid() then
- level = level + 1
- if (level == 10 && !sqlDonator) then -- non-donators can't go past level 10 even though they continue to gain experience.
- ply:SetNWInt("level", level)
- return level
- end
- else
- ply:SetNWInt("level", level)
- return level
- end
- end
- ply:SetNWInt("level", level)
- return level -- fallback
- end
Add Comment
Please, Sign In to add comment