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

Funkcja

isPlayerHudComponentVisible

Sprawdza, czy składnik interfejsu gry jest u gracza widoczny (według ustawień z setPlayerHudComponentVisible). Składnik bez własnego ustawienia ma stan "all".

Składnia

Serwer

bool isPlayerHudComponentVisible(player thePlayer, string component)

Klient

bool isPlayerHudComponentVisible(string component)

Argumenty

thePlayerplayer
Gracz (tylko serwer).W MTA:SA inny typ: string component
componentstring
Nazwa składnika (zob. getHudComponentNames).Nie ma go w MTA:SA

Różnice względem MTA:SA

  • Argumenty zaznaczone innym kolorem różnią się od MTA:SA.

W MTA:SA

isPlayerHudComponentVisible(string component)

Zwraca

true, jeśli widoczny; false także dla nieznanego składnika.

Przykład

if isPlayerHudComponentVisible(player, "radar") then
    setPlayerHudComponentVisible(player, "radar", false)
end

Zobacz też