SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Funkcje klienta
  3. isElementStreamedIn

Funkcja

isElementStreamedIn

KlientElementyIdentyczna z MTA:SA

Sprawdza, czy element jest wczytany u tego gracza.

Składnia

bool isElementStreamedIn(element theElement)

Argumenty

theElementelement
Element.

Zwraca

true, jeśli wczytany.

Przykład

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)

Zobacz też