- Documentation
- Server functions
- getElementChildren
Function
getElementChildren
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")