Created
February 14, 2024 01:12
-
-
Save MrGrootx/09eff97ef803d917cb3942b6488db504 to your computer and use it in GitHub Desktop.
esx DrawMarker with whitelist job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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