Skip to content

AddPlayerPerk

Gives the player’s character a perk.

perk is the perk’s GUID, or - when the server has the game’s tables export (Exporting the game’s tables) - its name or its English name, as the perks list spells them, in any case. The record holds it at once. A perk the mode gives costs the character no perk point and, like every order of the mode’s, counts as theirs from the moment it is sent: the progression check takes nothing back for it. Giving a perk the character already holds is fine. Called before the player is in the world, the perk is given right after their spawn.

AddPlayerPerk(pid, perk)
Parameter Type
pid number the player
perk string a perk GUID, or its name or English name

boolean - false for a name the server cannot resolve (a GUID always passes), or a player not connected

-- a starter perk for every new recruit
AddPlayerPerk(pid, "Hard-Working Lad")
AddPlayerPerk(pid, "ad840150-ca47-4c8f-8e05-fd9ef632e685") -- the same perk by its GUID

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