Update functions.lua

This commit is contained in:
Kakarot
2021-09-28 07:33:08 -05:00
committed by GitHub
parent 1ce5d0e48e
commit 8a1181171c
+3 -3
View File
@@ -105,7 +105,7 @@ function QBCore.Functions.GetPlayers() return GetActivePlayers() end
function QBCore.Functions.GetPeds(ignoreList)
local pedPool = GetGamePool('CPed')
local ignoreList = ignoreList or {}
local ignoreList = ignoreList or {}
local peds = {}
for i = 1, #pedPool, 1 do
local found = false
@@ -123,8 +123,8 @@ end
function QBCore.Functions.GetClosestPed(coords, ignoreList)
local ped = PlayerPedId()
if not coords then coords = GetEntityCoords(ped) end
local ignoreList = ignoreList or {}
local coords = coords or GetEntityCoords(ped)
local ignoreList = ignoreList or {}
local peds = QBCore.Functions.GetPeds(ignoreList)
local closestDistance = -1
local closestPed = -1