Skip to content

SetPlayerXPRate

Gives one player an XP rate of their own, over the server-wide one.

The same multiplier as SetXPRate, for this player alone: 0 .. 100. nil takes the override away and the player follows the server-wide rate again. It lasts until the player leaves.

SetPlayerXPRate(pid, rate)
Parameter Type
pid number the player
rate number | nil 0 .. 100; nil = follow the server-wide rate

boolean - false for a rate outside 0..100, or a player not connected

-- a newcomer learns at double speed until they are at home in the world
SetPlayerXPRate(pid, 2)
-- ... and later, when the week is over:
SetPlayerXPRate(pid, nil)

GetPlayerXPRate · SetXPRate · OnPlayerGainXP · the Stats, skills, XP and perks group of the index