Skip to content

Instantly share code, notes, and snippets.

@MrGrootx
Created February 14, 2024 01:12
Show Gist options
  • Save MrGrootx/09eff97ef803d917cb3942b6488db504 to your computer and use it in GitHub Desktop.
Save MrGrootx/09eff97ef803d917cb3942b6488db504 to your computer and use it in GitHub Desktop.
esx DrawMarker with whitelist job
Citizen.CreateThread(function()
while true do
local coords = Config.vehicleSpawn.MarkerPos
local pedCoords = GetEntityCoords(PlayerPedId())
if ESX.PlayerData.job and ESX.PlayerData.job.name then
if ESX.GetPlayerData().job and ESX.GetPlayerData().job.name then
if ESX.GetPlayerData().job.name == "police" then
DrawMarker(21, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 1.0, 1.0, 1.0, 0, 255, 20,
50, false, true, 2, false, nil, nil, false)
if Vdist(pedCoords, coords) < 1 then
ESX.ShowHelpNotification('Click ~INPUT_CONTEXT~ to open Garage', true, true, true)
end
end
end
end
Citizen.Wait(0)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment