> 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/qbx_hud.md).

# qbx\_hud

***

#### 1. Open the file

Open the following file: **qbx\_hud/client/main.lua**

#### 2. Remove unnecessary code

Find the `hud:client:UpdateNeeds` event and delete the entire block `RegisterNetEvent`.

Find the `hud:client:UpdateStress` event and delete the entire block `RegisterNetEvent`.

#### 3. Modify code

Find the `QBCore:Client:OnPlayerLoaded` event and modify the highlighted lines inside it.

<pre class="language-lua"><code class="lang-lua">RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
    Wait(2000)
    local hudSettings = GetResourceKvpString('hudSettings')
    if hudSettings then loadSettings(json.decode(hudSettings)) end
<strong>    stress = exports['vms_needs']:GetPercentageStatus('stress')
</strong><strong>    hunger = exports['vms_needs']:GetPercentageStatus('hunger')
</strong><strong>    thirst = exports['vms_needs']:GetPercentageStatus('thirst')
</strong>    hp = QBX.PlayerData.metadata.health
end)
</code></pre>

Find the `startWeaponStressThread` function and modify the highlighted line inside it.

<pre class="language-lua"><code class="lang-lua">local function startWeaponStressThread(weapon)
    if isWhitelistedWeaponStress(weapon) then return end
    hasWeapon = true

    CreateThread(function()
        while hasWeapon do
            if IsPedShooting(cache.ped) then
                if math.random() &#x3C;= config.stress.chance then
<strong>                    exports['vms_needs']:AddStatus('stress', math.random(1, 5))
</strong>                end
            end
            Wait(0)
        end
    end)
end
</code></pre>

Find the Speeding thread and modify the highlighted line inside it.

<pre class="language-lua"><code class="lang-lua">if config.stress.enableStress then
    CreateThread(function() -- Speeding
        while true do
            if LocalPlayer.state.isLoggedIn then
                if cache.vehicle then
                    local vehClass = GetVehicleClass(cache.vehicle)
                    local speed = GetEntitySpeed(cache.vehicle) * speedMultiplier

                    if vehClass ~= 13 and vehClass ~= 14 and vehClass ~= 15 and vehClass ~= 16 and vehClass ~= 21 then
                        local stressSpeed
                        if vehClass == 8 then
                            stressSpeed = config.stress.minForSpeeding
                        else
                            stressSpeed = LocalPlayer.state?.seatbelt and config.stress.minForSpeeding or config.stress.minForSpeedingUnbuckled
                        end
                        if speed >= stressSpeed then
<strong>                            exports['vms_needs']:AddStatus('stress', math.random(1, 3))
</strong>                        end
                    end
                end
            end
            Wait(10000)
        end
    end)
end
</code></pre>
