ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getElementChildren

Function

getElementChildren

ServerElementsIdentical to MTA:SA

Returns an element's children in the tree, optionally only of one type.

Syntax

table getElementChildren(element parent [, string theType = nil])

Arguments

parentelement
The parent.
theTypestring, optional = nil
Type of children.

Returns

A table of elements.

Example

local vehicles = getElementChildren(resourceRoot, "vehicle")
outputServerLog("Ten zasób ma " .. #vehicles .. " pojazdów")

See also