Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
[#12] try to make it faster
Browse files Browse the repository at this point in the history
  • Loading branch information
lfuelling committed Dec 14, 2019
1 parent b77bb70 commit 352f480
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ function __drawPcMarkers(location)
if location.x ~= NIL then
-- some locations are not machines
if location.machine ~= NIL then
drawGenericMarker(location.x, location.y, location.z - 1.001)
if GetDistanceBetweenCoords(location.x, location.y, location.z, GetEntityCoords(GetPlayerPed(-1), true)) < 2 then
if IsControlJustPressed(1, 38) then
EnableGui(true, location.machine)
else
ESX.ShowHelpNotification(missionMarker.hint)
if GetDistanceBetweenCoords(location.x, location.y, location.z, GetEntityCoords(GetPlayerPed(-1), true)) < 200 then
drawGenericMarker(location.x, location.y, location.z - 1.001)
if GetDistanceBetweenCoords(location.x, location.y, location.z, GetEntityCoords(GetPlayerPed(-1), true)) < 2 then
if IsControlJustPressed(1, 38) then
EnableGui(true, location.machine)
else
ESX.ShowHelpNotification(missionMarker.hint)
end
end
end
end
Expand Down

0 comments on commit 352f480

Please sign in to comment.