Introduction

A configurable food and water HUD that drains over time, damages players who ignore it, and resets on r

Food and water drain automatically in the background, and once either hits zero the player starts taking damage every few seconds until they eat, drink, or die. Everything about the pace, the HUD's look, and what counts as food or drink is controlled from config.lua.

Two things you have to wire up yourself

MS.StartProgressbar (config.lua) is an empty stub — hook up your progress bar library (ox_lib, esx_progressbar, qb-progressbar, …) or players get no visual feedback while eating or drinking. MS.ReviveEvent defaults to esx_ambulancejob:revive; point it at whatever event your server actually fires on revive, or food and water are never reset afterwards.

Features

  • Food and water HUD with 9 visual variants and 2 header styles (MS.Layout), freely moved, flipped, and recoloured per player from an in-game settings menu
  • Both values drain automatically on a timer (MS.Settings.interval) and show a warning icon once they drop below MS.Settings.warning
  • Configurable starvation/dehydration damage (MS.Settings.damage) once food or water hits zero, suspended inside safezones (MS.Safezone) like the hospital by default
  • Configurable consumable items (MS.Items) that restore food, water, or both, each with its own eat/drink animation, attached prop, and sound
  • In-game settings menu (MS.Settings.menuCommand, default /status) to toggle, move, flip, and recolour the HUD, plus a reset command (MS.Settings.resetCommand, default /reset) to snap it back to its default position
  • Resets food and water automatically on revive, via a configurable client event (MS.ReviveEvent)

Requirements

more_libresourcerequired

Shared library dependency of the "More Scripts" resource pack. Must be installed and started before this resource; provides framework detection (ESX/QBCore/Qbox) and the shared helpers this resource relies on.

MS.ReviveEventeventrequired

Client event this resource listens for to reset food and water after a revive. Defaults to ESX's ambulance-job revive event — change it to match whatever your server actually fires (e.g. main/revive for MORE Revivestation), or the reset never happens.

MS.StartProgressbarfunctiondefault

Client-side hook called when a player uses a food/drink item; empty by default. Wire it to your progress bar library (ox_lib, esx_progressbar, qb-progressbar, …) to show a bar during the animation. Without it, items are used instantly with no progress bar.

MS.Itemsitemrequired

Item names in MS.Items must match real item names in your inventory system exactly; whatever an item's name is here is exactly what your inventory must define and what players must hold to use it.

Last updated