Skip to content

Commit

Permalink
fix(bridge/qb/client): GetClosestPlayer not ignoring local player
Browse files Browse the repository at this point in the history
  • Loading branch information
D4isDAVID committed Feb 3, 2024
1 parent a1930f9 commit 7637a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridge/qb/client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ functions.IsWearingGloves = qbx.isWearingGloves
---@deprecated use lib.getClosestPlayer from ox_lib
functions.GetClosestPlayer = function(coords) -- luacheck: ignore
coords = type(coords) == 'table' and vec3(coords.x, coords.y, coords.z) or coords or GetEntityCoords(cache.ped)
local players = GetActivePlayers()
local players = lib.getNearbyPlayers(coords, 5, false)
local closestDistance = -1
local closestPlayer = -1
for i = 1, #players do
Expand Down

0 comments on commit 7637a86

Please sign in to comment.