> 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/ambulance-job/esx_ambulancejob.md).

# esx\_ambulancejob

{% hint style="warning" %}
Only add the highlighted lines. Do not replace the existing esx\_ambulancejob code.
{% endhint %}

***

#### 1. Open the file

Open the following file: **esx\_ambulancejob/client/main.lua**

#### 2. Restore Visual Effects After Revive

Find the `esx_ambulancejob:revive` event and add the highlighted lines inside it.

{% hint style="info" %}
This restores the active VMS Needs visual effect after the ambulance job removes or replaces the current screen effect. Player statuses, alcohol, and substance effects are not reset.
{% endhint %}

<pre class="language-lua"><code class="lang-lua">RegisterNetEvent('esx_ambulancejob:revive')
AddEventHandler('esx_ambulancejob:revive', function()
    -- Your existing code...

    -- ===== VMS Needs =====
<strong>    if GetResourceState('vms_needs') == 'started' then
</strong><strong>        exports['vms_needs']:ReloadVisualEffect()
</strong><strong>    end
</strong>    -- =====================
end)
</code></pre>

#### 3. Restore Player Statuses After Hospital Respawn

Find the `RemoveItemsAfterRPDeath` function and add the highlighted lines inside it.

{% hint style="info" %}
This restores hunger and thirst to at least 50% after a hospital respawn and clears the configured alcohol and substance statuses.
{% endhint %}

<pre class="language-lua"><code class="lang-lua">function RemoveItemsAfterRPDeath()
    TriggerServerEvent('esx_ambulancejob:setDeathStatus', false)

    CreateThread(function()
        ESX.TriggerServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function()
            -- Your existing code...
    
            -- ===== VMS Needs =====
<strong>            if GetResourceState('vms_needs') == 'started' then
</strong><strong>                local hunger = exports['vms_needs']:GetPercentageStatus('hunger')
</strong><strong>                if hunger &#x3C; 50.0 then
</strong><strong>                    exports['vms_needs']:SetStatus('hunger', 250.0) -- 250.0 = half
</strong><strong>                end
</strong><strong>                
</strong><strong>                local thirst = exports['vms_needs']:GetPercentageStatus('thirst')
</strong><strong>                if thirst &#x3C; 50.0 then
</strong><strong>                    exports['vms_needs']:SetStatus('thirst', 250.0) -- 250.0 = half
</strong><strong>                end
</strong><strong>                
</strong><strong>                exports['vms_needs']:SetStatus('stress', 0.0)
</strong><strong>                
</strong><strong>                exports['vms_needs']:CleanupOptionalStatuses()
</strong><strong>            end
</strong>            -- =====================
        end)
    end)
end
</code></pre>
