feat(client/functions.lua): Distance

Added second return parameter which contains distance
This commit is contained in:
GhzGarage
2021-09-25 18:06:52 -05:00
parent 7591ec6f59
commit 5555cd6662
+3 -3
View File
@@ -155,7 +155,7 @@ function QBCore.Functions.GetClosestVehicle()
closestDistance = distance
end
end
return closestVehicle
return closestVehicle, closestDistance
end
function QBCore.Functions.GetClosestObject()
@@ -172,7 +172,7 @@ function QBCore.Functions.GetClosestObject()
closestDistance = distance
end
end
return closestObject
return closestObject, closestDistance
end
function QBCore.Functions.GetClosestPed()
@@ -190,7 +190,7 @@ function QBCore.Functions.GetClosestPed()
closestDistance = distance
end
end
return closestPed
return closestPed, closestDistance
end
-- Vehicle