SetPlayerNourishment
Sets how well fed the player’s character is.
value is 0 or more, clamped to the maximum once the server knows it (GetPlayerNourishment gives both) - and, under
[audit] mode = "enforce", to the game’s own maximum of 150 whatever their game reported, since no honest set goes higher
(observe leaves the mode’s own value as it is); the game runs it on from there. A set of the mode’s own voids the
nourishment check’s stretch of judging for that value, so setting it never reads as a trainer. Called before the player is in
the world, it is applied right after their spawn.
Syntax
Section titled “Syntax”SetPlayerNourishment(pid, value)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
value |
number | the nourishment, 0 or more |
Returns
Section titled “Returns”boolean - false for a value below 0 or not a number, or a player not connected
Example
Section titled “Example”-- a meal at the innlocal _, max = GetPlayerNourishment(pid)if max and max > 0 then SetPlayerNourishment(pid, max) endSee also
Section titled “See also”GetPlayerNourishment · SetPlayerEnergy · the Stats, skills, XP and perks group of the index
