Citizen.CreateThread(function()
while true do
local plyPed = PlayerPedId()
if PlayerData.job ~= nil and (PlayerData.job.name == 'police') then
if IsPedInAnyVehicle(plyPed, false) then
local plyPos = GetEntityCoords(plyPed)
nearDefault = isNear(plyPos, bennyLocation, 10)
if nearDefault then
if not isPlyInBennys and nearDefault then
DrawMarker(21, bennyLocation.x, bennyLocation.y, bennyLocation.z + 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 148, 0, 211, 255, true, false, 2, true, nil, nil, false)
end
if nearDefault then
if not isPlyInBennys then
Draw3DText(bennyLocation.x, bennyLocation.y, bennyLocation.z + 0.5, "~p~E~w~ - Polis Mekanik", 255, 255, 255, 255, 4, 0.45, true, true, true, true, 0, 0, 0, 0, 55)
if IsControlJustReleased(1, 38) then
TriggerEvent('event:control:bennys', 1)
end
else
disableControls()
end
end
else
Wait(1000)
end
else
Wait(2000)
end
end
Citizen.Wait(1)
end
end)