Skip to content

GetPerkName

The English name of a perk.

perk is a GUID or the game’s name for the perk. The names come with the game’s tables export (Exporting the game’s tables); without it - or for a GUID the export does not list - the answer is nil.

GetPerkName(perk)
Parameter Type
perk string a perk GUID or name

string | nil - the English name; nil when the server has none

local names = {}
for _, perk in ipairs(GetPlayerPerks(pid)) do names[#names + 1] = GetPerkName(perk) or perk end
SendClientMessage(pid, COLOR_WHITE, "Your perks: " .. table.concat(names, ", "))

GetPlayerPerks · HasPlayerPerk · AddPlayerPerk · the Stats, skills, XP and perks group of the index