fix(qb-core/client/functions.lua): Close Player

There was a mistake when replacing table.insert that caused closest player to not be found
This commit is contained in:
Kakarot
2021-09-25 11:08:40 -05:00
committed by GitHub
parent f07fbbcf81
commit ddc396d2c9
+2 -2
View File
@@ -135,7 +135,7 @@ function QBCore.Functions.GetPlayersFromCoords(coords, distance)
local targetCoords = GetEntityCoords(target)
local targetdistance = #(targetCoords - coords)
if targetdistance <= distance then
closePlayers[player] = player
closePlayers[#closePlayers+1] = player
end
end
return closePlayers
@@ -415,4 +415,4 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
SetVehicleLivery(vehicle, props.modLivery)
end
end
end
end