GetPlayerSkillXP
The XP a skill has gathered toward its next level, and what that level takes.
Syntax
Section titled “Syntax”GetPlayerSkillXP(pid, skill)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
skill |
string | the skill’s name |
Returns
Section titled “Returns”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
Example
Section titled “Example”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))endSee also
Section titled “See also”GetPlayerSkill · AddPlayerSkillXP · GetPlayerStatXP · the Stats, skills, XP and perks group of the index
