mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
requested changes
This commit is contained in:
@@ -11,16 +11,15 @@ function NDCore.Functions.GetCharacters()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function NDCore.Functions.GetPlayersFromCoords(coords, distance)
|
function NDCore.Functions.GetPlayersFromCoords(distance, coords)
|
||||||
local players = GetActivePlayers()
|
|
||||||
local ped = PlayerPedId()
|
|
||||||
if coords then
|
if coords then
|
||||||
coords = type(coords) == 'table' and vec3(coords.x, coords.y, coords.z) or coords
|
coords = type(coords) == 'table' and vec3(coords.x, coords.y, coords.z) or coords
|
||||||
else
|
else
|
||||||
coords = GetEntityCoords(ped)
|
coords = GetEntityCoords(PlayerPedId())
|
||||||
end
|
end
|
||||||
distance = distance or 5
|
distance = distance or 5
|
||||||
local closePlayers = {}
|
local closePlayers = {}
|
||||||
|
local players = GetActivePlayers()
|
||||||
for _, player in pairs(players) do
|
for _, player in pairs(players) do
|
||||||
local target = GetPlayerPed(player)
|
local target = GetPlayerPed(player)
|
||||||
local targetCoords = GetEntityCoords(target)
|
local targetCoords = GetEntityCoords(target)
|
||||||
|
|||||||
Reference in New Issue
Block a user