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.
Syntax
Section titled “Syntax”GetPerkName(perk)| Parameter | Type | |
|---|---|---|
perk |
string | a perk GUID or name |
Returns
Section titled “Returns”string | nil - the English name; nil when the server has none
Example
Section titled “Example”local names = {}for _, perk in ipairs(GetPlayerPerks(pid)) do names[#names + 1] = GetPerkName(perk) or perk endSendClientMessage(pid, COLOR_WHITE, "Your perks: " .. table.concat(names, ", "))See also
Section titled “See also”GetPlayerPerks · HasPlayerPerk · AddPlayerPerk · the Stats, skills, XP and perks group of the index
