mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 23:46:03 +01:00
feat(client/imports): getClosestPed
This commit is contained in:
@@ -10,8 +10,8 @@ function lib.getNearbyPeds(coords, maxDistance)
|
||||
for i = 1, #peds do
|
||||
local ped = peds[i]
|
||||
|
||||
if not NetworkGetPlayerIndexFromPed(ped) then
|
||||
local pedCoords = GetEntityCoords(playerPed)
|
||||
if not IsPedAPlayer(ped) then
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local distance = #(coords - pedCoords)
|
||||
|
||||
if distance < maxDistance then
|
||||
|
||||
Reference in New Issue
Block a user