SetPlayerCodexEntry
Unlocks a Codex entry for a player, or locks it again.
silent unlocks it without the game’s “new Codex entry” notice. A player who is not in the world yet gets it when they
spawn. An entry SetCodexEntryHidden hides is unlocked all the same - the hiding stops the game, not the mode.
Syntax
Section titled “Syntax”SetPlayerCodexEntry(pid, entry [, unlocked, silent])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
entry |
string | the entry’s perk - its GUID or the game’s perk name (the Codex entries) |
unlocked |
boolean | true (the default) unlocks it, false locks it again (optional) |
silent |
boolean | true = no “new Codex entry” notice (optional) |
Returns
Section titled “Returns”boolean - false for an unknown player or an entry name the server’s tables do not know
Example
Section titled “Example”-- the reveal of a roleplay scene: the abbot's story in the player's CodexSetTextOverride("ui_codex_name_rabin", "The Abbot's Secret")SetTextOverride("ui_codex_cont_rabin", "<paragraph>Brother Anselm was never a monk ...")SetPlayerCodexEntry(pid, "0298f5cd-21e3-4284-95ff-87114609832b")See also
Section titled “See also”HasPlayerCodexEntry · SetCodexEntryHidden · SetTextOverride · GetPlayerPerks · the The Codex group of the index
