Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(1)
- local coords, currentZone = GetEntityCoords(PlayerPedId()), nil
- for i=1, #Config.Zones, 1 do
- if GetDistanceBetweenCoords(coords, Config.Zones[i].x, Config.Zones[i].y, Config.Zones[i].z, true) < (Config.ZoneSize.x / 2) then
- isInJoblistingMarker = true
- ESX.ShowHelpNotification(_U('access_job_center'))
- end
- end
- if isInJoblistingMarker and not hasAlreadyEnteredMarker then
- hasAlreadyEnteredMarker = true
- end
- if not isInJoblistingMarker and hasAlreadyEnteredMarker then
- hasAlreadyEnteredMarker = false
- TriggerEvent('esx_joblisting:hasExitedMarker')
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement