- Dokumentacja
- Funkcje serwera
- setPlayerHudComponentProperty
Funkcja
setPlayerHudComponentProperty
Zapisuje wygląd składnika interfejsu: jedną właściwość albo całą tabelę. Właściwości: posX, posY, size, fillColor, fillColorSecondary, textColor, alignment, drawBlackBorder, drawPercentage, blinkingTimeLimit, textOutline, textShadow, useFontTexture.
Składnia
bool setPlayerHudComponentProperty(player thePlayer, string component, mixed property [, mixed value = nil])Argumenty
thePlayerplayer- Gracz.W MTA:SA inny typ: string component
componentstring- Składnik.
propertymixed- Nazwa właściwości albo tabela
{nazwa = wartość}. valuemixed, opcjonalny = nil- Wartość (gdy podano nazwę).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
setPlayerHudComponentProperty(string component, string property, mixed value)Zwraca
true przy powodzeniu.
Przykład
setPlayerHudComponentProperty(player, "health", { fillColor = { 0, 200, 0, 255 }, drawPercentage = true })
Uwagi
Stan dla skryptów. Serwer zapamiętuje wygląd i zwraca go w getPlayerHudComponentProperty; interfejs gry jeszcze go nie stosuje.