Need help with esx_ambulancejob

Hello !
This is a modified version of esx_ambulancejob which I configured to my liking.
Whenever a player presses “G” (Distress Signal Key) it sends a notify to all players with the job “ambulance”, it also creates a blip only they can see. But whenever a player revives themselves it does not remove the blip and the blip stays
Here is the code, if you can help and tell me whats the issue it’d be nice :smiley:

function DisplayDistressSignalBlip()
    local playerPed = PlayerPedId()

    -- Add a blip on the player
    local blip = AddBlipForEntity(playerPed)
    SetBlipSprite(blip, 161)
                SetBlipScale(blip, 1.2)
                SetBlipColour(blip, 1)
                BeginTextCommandSetBlipName("STRING")
                AddTextComponentString('Wounded Person')
                EndTextCommandSetBlipName(blip)
    isDistressSignalActive = true
end

function RemoveDistressSignalBlip()
    local playerPed = PlayerPedId()

    -- Remove the blip
    local blip = GetBlipFromEntity(playerPed)
    if DoesBlipExist(blip) then
        RemoveBlip(blip)
    end

    isDistressSignalActive = true
end

Also, the blip shows for everyone…
Have a good day hope you can help !

You didnt even define for wich job thats why everyone sees it

I know fixed it but what about when it removes the blip

Maybe an extra event for that ??

Do you know how to add it I’m tired tryna figure it out

Im at work cant really help rn but i will try to help you later

Alright

Have you tried giving each blip a unique number id and maybe use them if you delete them.

Or

make a wait for x seconds after that delete.