Note
جهة الكلاينت
The available status types are Hunger and Thirst. The key is case insensitive.
Value range: Hunger and Thirst go from 0 to 1000.
Tip
Food and drink items are registered automatically from jrs_items (type food / drink). To tune a single item, add it to Config in jrs_metabolism/config.lua.
Change metabolism value#
Adds the given amount to the current value, the result is clamped to 0..1000.
TriggerEvent('jrsmetabolism:changeValue', 'Hunger', 250)Set metabolism value#
Sets the value directly, clamped to 0..1000.
TriggerEvent('jrsmetabolism:setValue', 'Thirst', 1000)Get metabolism value#
Returns the current value through the callback, or nil if the key is not a valid status.
TriggerEvent('jrsmetabolism:getValue', 'Hunger', function(value)
print('hunger value', value)
end)Toggle the HUD#
Shows or hides the metabolism HUD.
TriggerEvent('jrsmetabolism:setHud', true) -- false to hide