> For the complete documentation index, see [llms.txt](https://docs.vames-store.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vames-store.com/assets/vms_needs/compatibility/hud/tuff-hud.md).

# tuff-hud

***

#### 1. Open the file

Open the following file: **tuff-hud/client/bridge/framework/*****YOUR\_FRAMEWORK*****/client.lua**

#### 2. Remove unnecessary code

{% tabs %}
{% tab title="qb-core" %}
Find the `QBCoreBridge:ApplyPlayerData` function and delete the entire section on hunger, thirst, and stress.

```lua
if PlayerData.metadata then
    if PlayerData.metadata.hunger ~= nil then Client.PlayerData.Hunger = math.floor(PlayerData.metadata.hunger) end
    if PlayerData.metadata.thirst ~= nil then Client.PlayerData.Thrist = math.floor(PlayerData.metadata.thirst) end
    if not Settings.DisableStress and Settings.FrameworkSystems and PlayerData.metadata.stress ~= nil then
        Client.PlayerData.Stress = math.floor(PlayerData.metadata.stress)
    end
end
```

{% endtab %}

{% tab title="qbx\_core" %}
Find the `QboxBridge:ApplyPlayerData` function and delete the entire section on hunger, thirst, and stress.

```lua
if PlayerData.metadata then
    if PlayerData.metadata.hunger ~= nil then
        Client.PlayerData.Hunger = math.floor(PlayerData.metadata.hunger)
    end
    
    if PlayerData.metadata.thirst ~= nil then
        Client.PlayerData.Thrist = math.floor(PlayerData.metadata.thirst)
    end
    
    if not Settings.DisableStress and Settings.FrameworkSystems and PlayerData.metadata.stress ~= nil then
        Client.PlayerData.Stress = math.floor(PlayerData.metadata.stress)
    end
end
```

{% endtab %}
{% endtabs %}

#### 3. Modify code

{% tabs %}
{% tab title="esx" %}
Find the `ESXBridge:StartStatusListener` function and replace with the following:

```lua
function ESXBridge:StartStatusListener(Client, Settings, refreshPlayerData)
    AddStateBagChangeHandler("hunger", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Hunger = percentage
    end)

    AddStateBagChangeHandler("thirst", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Thrist = percentage
    end)

    AddStateBagChangeHandler("stress", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Stress = percentage
    end)
end
```

{% endtab %}

{% tab title="qb-core" %}
Find the `QBCoreBridge:StartStatusListener` function and replace with the following:

```lua
function QBCoreBridge:StartStatusListener(Client, Settings, refreshPlayerData)
    AddStateBagChangeHandler("hunger", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Hunger = percentage
    end)

    AddStateBagChangeHandler("thirst", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Thrist = percentage
    end)

    AddStateBagChangeHandler("stress", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Stress = percentage
    end)
end
```

{% endtab %}

{% tab title="qbx\_core" %}
Find the `QboxBridge:StartStatusListener` function and replace with the following:

```lua
function QboxBridge:StartStatusListener(Client, Settings, refreshPlayerData)
    AddStateBagChangeHandler("hunger", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Hunger = percentage
    end)

    AddStateBagChangeHandler("thirst", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Thrist = percentage
    end)

    AddStateBagChangeHandler("stress", ("player:%s"):format(GetPlayerServerId(PlayerId())), function(_, _, percentage)
        Client.PlayerData.Stress = percentage
    end)
end
```

{% endtab %}
{% endtabs %}
