API
The two points where this resource depen
This resource is mostly self-contained — nearly everything about it is controlled from config.lua and it doesn't call out to other resources. There are exactly two exceptions, both already mentioned on the Configuration page, and both things you're expected to wire up yourself.
MS.ReviveEvent names a client event this resource listens for. When it fires, food and water are reset to full. The default is ESX's ambulance-job revive event; if your server fires something else instead — MORE Revivestation's revive event, for example — point MS.ReviveEvent at that, or the reset never happens.
MS.StartProgressbar (client side)
MS.StartProgressbar(msg, duration) is called whenever a player uses a food or drink item; it's empty by default. Wire it into your progress bar library of choice (ox_lib, esx_progressbar, qb-progressbar, …) so it starts a bar for the given message and duration while the eat/drink animation plays. If you leave it empty, items still work — they're just consumed instantly with no visual feedback.
Last updated