[Help] How can i make Blips Dynamic

Hey guys,
Im pretty new to the FiveM and Scripting in total.
So i just wanna know if there is a way to make Blips Dynamic. So when i change job they get shown and when i change Job it should get removed.
I use ESX

P.S. Sorry for Bad Englisch

You could take a look at esx_policejob and take an example out of that script.

In the main Script is only a full time blip.

Nope, blip goes away when you’re not on duty or don’t have the job

This can be very easily achieved with just an if-statement, for example:

if PlayerData.job.name == "police" then
      -- Code for your blips here
end

If your script already uses some form of job integration then you won’t have to worry about getting the job from ESX.

Oh i see, missed a server function who update blips. Yeah okey i need to have a deeper look. Thank you i reply later again i guess

I tryed that but then i have to reconnect that, then it get showned and updatet = Not Dynamic :see_no_evil:

Then you’ll have to modify it so that it uses event handlers to update your job when the job is changed instead of just getting the job when the player spawns in. It would look something like this:

RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
    currentJob = job.name
end)

Already have that. But i think i have an idea what thing i missed.