SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Funkcje wspólne
  3. getElementHealth

Funkcja

getElementHealth

Serwer i klientElementyIdentyczna z MTA:SA

Zwraca zdrowie elementu: postaci 0-100 (do 176 z pełną wytrzymałością), pojazdu 0-1000 (poniżej 250 się pali).

Składnia

float getElementHealth(element theElement)

Argumenty

theElementelement
Gracz, NPC, pojazd albo obiekt.

Zwraca

Zdrowie albo false.

Przykład

addCommandHandler("hp", function(player)
    outputChatBox(("Zdrowie: %.0f"):format(getElementHealth(player)), player)
end)

Zobacz też