[HELP ESX] Blip, Panic Buttton

when i Add blip using the panic button and someone joins the server after i enable it, he cant see it.
so how can i fix it?

The blip would have to load on the client side after they are actually in the game

How can I do it?

You would need to store the blips location somewhere and then trigger an event to display the blips when someone joins. Why would someone need to see a panic marker on the map as soon as they join though?

blip = nil

blips = {}

local currentHelpLocation = false

– Intial

Citizen.CreateThread(function()

counter = 3

while true do

    Citizen.Wait(0)

   if (IsControlPressed(1, 57) and GetLastInputMethod(0)) and (PlayerData.job.name == 'admin' or PlayerData.job.name == 'police' or PlayerData.job.name == 'fsf') then



            counter = 3

        DrawCounter()

                while IsControlPressed(0, 57) and counter ~= 0 do

            counter = counter - 1

            Citizen.Wait(1000)

        end

local location = GetStreetNameAtCoord(playerPos, streetName, crossingRoad)

local location2 = GetStreetNameFromHashKey(location)

print (playerPos)

print (location2)

local name = GetPlayerName(PlayerId())

Info()

Citizen.Wait(100)

Info2(location2)

PlaySound(-1, “5_Second_Timer”, “DLC_HEISTS_GENERAL_FRONTEND_SOUNDS”, 0);

local name = GetPlayerName(PlayerId())

local ped = GetPlayerPed(-1)

local playerPos = GetEntityCoords(ped, true)

print (playerPos)

if not currentHelpLocation then

currentHelpLocation = AddBlipForRadius (playerPos.x, playerPos.y, playerPos.z, 100.0)



TriggerEvent("chat:addMessage", {

    color = fullColor,

    multiline = false,

    args = { fullName, "^8أرسل نداء استغاثة" }

})



message = 'رجل أمن بحاجة لمساعدة'

SetBlipColour(currentHelpLocation, 1)

SetBlipAlpha (currentHelpLocation, 128)

SetBlipFlashTimer(currentHelpLocation, 5)

SetBlipFlashes(currentHelpLocation, true)

SetBlipAsShortRange(currentHelpLocation , true)

BeginTextCommandSetBlipName(“STRING”)

AddTextComponentString('Panic Button by ’ … name)

EndTextCommandSetBlipName(currentHelpLocation)

    else

        TriggerEvent("chat:addMessage", {

            color = fullColor,

            multiline = false,

            args = { fullName, "^5انتهاء نداء الاستغاثة" }

        })

    

        RemoveBlip(currentHelpLocation)

        currentHelpLocation = nil

        

    end

end

end

end)

– Info

function Info(text)

local txd = "CHAR_CALL911"

SetNotificationTextEntry("STRING")

SetNotificationFlashColor(6)

SetNotificationBackgroundColor(6)

AddTextComponentSubstringPlayerName('An officer has activated his Panic Button!')

-- Set the notification icon, title and subtitle.

local title = GetPlayerName(PlayerId())

local subtitle = "Panic Button"

local iconType = 0

local flash = false

SetNotificationMessage(txd, txd, flash, iconType, title, subtitle)

DrawNotification(true, true)

end

function Info2(text)

SetNotificationTextEntry("STRING")

AddTextComponentSubstringPlayerName('Respond to ' .. text)

SetNotificationFlashColor(6)

SetNotificationBackgroundColor(6)

DrawNotification(true, true)

end

its a panic button for a police so if someone is rubbing a bank the police can enable the panic button (blip) so no one goes to this area other than thee police

i couldnt do it, can help me to do it pls

if u can msg me on discord if u want Kongo30#8535