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

Function

getResourceDynamicElementRoot

ServerResourcesIdentical to MTA:SA

Returns the root of the elements a resource creates while running. In Trilogy Hub it is the same element as getResourceRootElement.

Syntax

element getResourceDynamicElementRoot(resource theResource)

Arguments

theResourceresource
The resource.

Returns

The root or false.

Example

local root = getResourceDynamicElementRoot(getThisResource())
outputServerLog(#getElementChildren(root) .. " elementów")

See also