mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user