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

Function

getElementID

Server and clientElementsIdentical to MTA:SA

Returns the element's text ID.

Syntax

string getElementID(element theElement)

Arguments

theElementelement
The element.

Returns

The ID (empty when none).

Example

for _, obj in ipairs(getElementsByType("object")) do
    if getElementID(obj) ~= "" then
        outputServerLog(getElementID(obj))
    end
end

See also