GetMapObjectsNear
The map objects around a point, nearest first.
Syntax
Section titled “Syntax”GetMapObjectsNear(x, y, z, radius)| Parameter | Type | |
|---|---|---|
x |
number | metres |
y |
number | metres |
z |
number | metres |
radius |
number | metres |
Returns
Section titled “Returns”table - a list of GetMapObject’s tables, nearest first, at most 256 (a prefab unit and each of its objects - those with part_of set)
Example
Section titled “Example”local x, y, z = GetPlayerPos(pid)SendClientMessage(pid, COLOR_WHITE, #GetMapObjectsNear(x, y, z, 20) .. " placed objects within 20 m")See also
Section titled “See also”GetMapObject · the The server’s map group of the index
