mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Update functions.lua
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user