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