fix: if statement was the wrong way around

This commit is contained in:
Mycroft
2022-08-10 06:26:11 +01:00
parent b191da71d1
commit eb11249cbb
+2 -1
View File
@@ -32,7 +32,8 @@ local function getNearbyPlayers(source, closest, distance, ignore)
end
else
local dist = #(xPlayer.source - coords)
result = {id = xPlayer.source, ped = NetworkGetNetworkIdFromEntity(entity), coords = coords, dist = dist} if dist <= (result.dist or distance) then
if dist <= (result.dist or distance) then
result = {id = xPlayer.source, ped = NetworkGetNetworkIdFromEntity(entity), coords = coords, dist = dist}
end
end
end