From ddc396d2c99799c60dd1cf94f7f659177ededb90 Mon Sep 17 00:00:00 2001 From: Kakarot <57848836+GhzGarage@users.noreply.github.com> Date: Sat, 25 Sep 2021 11:08:40 -0500 Subject: [PATCH] fix(qb-core/client/functions.lua): Close Player There was a mistake when replacing table.insert that caused closest player to not be found --- client/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index bf4717f..6f02685 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -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 \ No newline at end of file +end