- Documentation
- Shared functions
- getElementByID
Function
getElementByID
Finds an element by its text ID (from a .map file or setElementID).
Syntax
element getElementByID(string id [, int index = 0])Arguments
idstring- The ID.
indexint, optional = 0- Which element with that ID (from 0).
Returns
The element or false.
Example
local gate = getElementByID("brama_policja")
if gate then
moveObject(gate, 3000, 1588, -1638, 8)
end