A simple hud without dependency just gta native.
- Extract the .zip or open it.
- Place
nth_simpleHud
into yourresources
folder. - Add
ensure nth_simpleHud
to yourserver.cfg
- FiveM
- That's all
Into Config.lua
line 9.
Config.lifeRequest = function()
--Insert your code here
return 50, 50 --The first is thirst and the seconde is hunger (Attention: This must return a percentage!)
end
I don't follow that there and need the "math.floor" I'm not testing, if it doesn't work remove it and just leave the "status.getPercent()"
Config.lifeRequest = function()
local thirst, hunger = nil, nil
TriggerEvent('esx_status:getStatus', 'thirst', function(status)
thirst = math.floor(100-status.getPercent())
end)
TriggerEvent('esx_status:getStatus', 'hunger', function(status)
hunger = math.floor(100-status.getPercent())
end)
return thirst, hunger
end