ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getElementByID

Function

getElementByID

Server and clientElementsIdentical to MTA:SA

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

See also