Pl/GetClothesTypeName

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

Ta funkcja pozwala na pobranie nazwy wybranego typu ubrań.

Składnia

string getClothesTypeName ( int clothesType )

Wymagane argumenty

  • clothesType: Liczba całkowita reprezentująca typ ubrań którego nazwę chcesz pobrać

Wartości zwrotne

Funkcja zwraca ciąg znaków (nazwę typu ubrań) jeśli wyszukiwanie się powiodło, w innym przypadku false.

Przykład

Ten przykład dodaje komendę /clothes która wyświetla graczu informacje o jego obecnym ubiorze.

function getClothes ( thePlayer, key, clothesType )
  local texture, model = getPedClothes ( source, clothesType )
  if ( texture and model ) then
    outputChatBox ( getPlayerName ( thePlayer ) .. " ubiera " .. texture .. " " .. model .. " na jego " .. getClothesTypeName ( clothesType ) )
  end
end
addCommandHandler ( "clothes", getClothes )

Zobacz także