From 8a1181171cc069547b6a518aeaad5d7eae2c1fe6 Mon Sep 17 00:00:00 2001 From: Kakarot <57848836+GhzGarage@users.noreply.github.com> Date: Tue, 28 Sep 2021 07:33:08 -0500 Subject: [PATCH] Update functions.lua --- client/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index a3e96f3..fa0fc4f 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -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