> For the complete documentation index, see [llms.txt](https://revel-scripts.gitbook.io/revel-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://revel-scripts.gitbook.io/revel-docs/scripts/revel-hud/config-client.md).

# Config Client

{% hint style="danger" %}
You need a status script to work properly, for ESX you can use <https://github.com/esx-framework/esx_status>
{% endhint %}

```lua
-- LoadHud() it's to load the player settings otherwise it will load default ones.

if Config.Framework == "ESX" then
    AddEventHandler('esx_status:onTick', function(data)
        local hunger, thirst
        for i = 1, #data do
            if data[i].name == 'thirst' then thirst = math.floor(data[i].percent) end
            if data[i].name == 'hunger' then hunger = math.floor(data[i].percent) end
        end
        SendNUIMessage({
            Action = "Food",
            Hunger = hunger,
            Thirst = thirst
        })
    end)
    AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
        LoadHud()
    end)
elseif Config.Framework == "QBCORE" then
    RegisterNetEvent('hud:client:UpdateNeeds', function(hunger, thirst)
        SendNUIMessage({
            Action = "Food",
            Hunger = hunger / 100,
            Thirst = thirst / 100
        })
    end)
    RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
        LoadHud()
    end)
elseif Config.Framework == "Other" then
    -- Put here your code

    --SendNUIMessage({
    --    Action = "Food",
    --    Hunger = hunger / 100,
    --    Thirst = thirst / 100
    --})
end

```
