Skip to content

GetPlayerSkillXP

The XP a skill has gathered toward its next level, and what that level takes.

GetPlayerSkillXP(pid, skill)
Parameter Type
pid number the player
skill string the skill’s name

number, number - xp, next - the XP gathered toward the next level, and the XP the next level takes in all; next is 0 at the top level, 0, 0 when the server does not know the skill yet

local xp, need = GetPlayerSkillXP(pid, "alchemy")
local level = GetPlayerSkill(pid, "alchemy")
if need > 0 then
SendClientMessage(pid, COLOR_WHITE, string.format("Alchemy %d: %.0f of %.0f XP to the next level.", level, xp, need))
end

GetPlayerSkill · AddPlayerSkillXP · GetPlayerStatXP · the Stats, skills, XP and perks group of the index