I currently have on the problem that when I restart a resource, for example esx_policejob the markers from esx_policejob disappear. They reappear when you go to the server again or when you restart the server.
I really hope someone has the solution for this problem and tell me how to fix this.
Your version of the job is probably using an PlayerConnected event to load the players ESX data (it needs the job).
loading playerdata like this on the clientside could help
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
ESX.PlayerData = ESX.GetPlayerData()
end)
Where do I have to insert it?
just in the client.lua you could also upload/post ur client side and i can have a better look im not sure which policejob u are using there is multiple ones
it’s not just about the policejob, it’s like that with every resource