HasPlayerPerk
Whether the player’s character holds a perk.
Syntax
Section titled “Syntax”HasPlayerPerk(pid, perk)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
perk |
string | a perk GUID, or its name or English name when the server has the game’s tables export |
Returns
Section titled “Returns”boolean - false for a perk the character lacks, a name the server cannot resolve, or a player not connected
Example
Section titled “Example”-- the marathon is for marathon runnersif not HasPlayerPerk(pid, "Marathon Runner") then SendClientMessage(pid, COLOR_RED, "Only those with the Marathon Runner perk may enter the race.")endSee also
Section titled “See also”GetPlayerPerks · AddPlayerPerk · RemovePlayerPerk · the Stats, skills, XP and perks group of the index
