ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getElementsWithinColShape

Function

getElementsWithinColShape

Server and clientElementsIdentical to MTA:SA

Returns the elements inside a collision shape, optionally of one type only.

Syntax

table getElementsWithinColShape(colshape theShape [, string elemType = nil])

Arguments

theShapecolshape
The shape.
elemTypestring, optional = nil
Element type.

Returns

A table of elements.

Example

local zone = createColSphere(2495, -1687, 13, 30)
addCommandHandler("obecni", function(player)
    outputChatBox("Na Grove: " .. #getElementsWithinColShape(zone, "player"), player)
end)

See also