ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. isElementStreamedIn

Function

isElementStreamedIn

ClientElementsIdentical to MTA:SA

Checks whether an element is loaded for this player.

Syntax

bool isElementStreamedIn(element theElement)

Arguments

theElementelement
The element.

Returns

true if loaded.

Example

addEventHandler("onClientRender", root, function()
    if isElement(vehicle) and isElementStreamedIn(vehicle) then
        local x, y, z = getElementPosition(vehicle)
        local sx, sy = getScreenFromWorldPosition(x, y, z + 1)
        if sx then dxDrawText("Na sprzedaż", sx, sy) end
    end
end)

See also