- Documentation
- Shared functions
- getRootElement
Function
getRootElement
Returns the root of the element tree: every server element is its child. The same as the root variable. Events attached to it come from every element.
Syntax
element getRootElement()Differences from MTA:SA
- In MTA:SA this function is client-side only.
In MTA:SA
getRootElement()Returns
The root.
Example
addEventHandler("onPlayerJoin", getRootElement(), function()
outputChatBox(getPlayerName(source) .. " dołączył.", root)
end)