mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
Add files via upload
This commit is contained in:
@@ -599,3 +599,17 @@ function getPlayer(source)
|
||||
end
|
||||
return Player
|
||||
end
|
||||
|
||||
function GetPlayersFromCoords(coords, radius)
|
||||
local players = {}
|
||||
for _, playerId in ipairs(GetActivePlayers()) do
|
||||
local ped = GetPlayerPed(playerId)
|
||||
if ped and DoesEntityExist(ped) then
|
||||
local playerCoords = GetEntityCoords(ped)
|
||||
if #(coords - playerCoords) <= radius then
|
||||
players[#players+1] = playerId
|
||||
end
|
||||
end
|
||||
end
|
||||
return players
|
||||
end
|
||||
Reference in New Issue
Block a user