Skip to content

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.

SetPlayerNourishment(pid, value)
Parameter Type
pid number the player
value number the nourishment, 0 or more

boolean - false for a value below 0 or not a number, or a player not connected

-- a meal at the inn
local _, max = GetPlayerNourishment(pid)
if max and max > 0 then SetPlayerNourishment(pid, max) end

GetPlayerNourishment · SetPlayerEnergy · the Stats, skills, XP and perks group of the index