Skip to content

HasPlayerPerk

Whether the player’s character holds a perk.

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

boolean - false for a perk the character lacks, a name the server cannot resolve, or a player not connected

-- the marathon is for marathon runners
if not HasPlayerPerk(pid, "Marathon Runner") then
SendClientMessage(pid, COLOR_RED, "Only those with the Marathon Runner perk may enter the race.")
end

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