HU/getClothesTypeName

From Multi Theft Auto: Wiki
Revision as of 10:48, 22 September 2018 by Surge (talk | contribs) (Created page with "__NOTOC__ {{Server client function}} This function is used to get the name of a certain clothes type. ==Syntax== <syntaxhighlight lang="lua"> string getClothesTypeName ( int...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function is used to get the name of a certain clothes type.

Syntax

string getClothesTypeName ( int clothesType )

Required Arguments

  • clothesType: An integer determining the type of clothes you want to get the clothes of.

Returns

This function returns a string (the name of the clothes type) if found, false otherwise.

Example

This example is used to output in the chatbox what clothes type the player who uses the 'clothes' command is wearing.

function getClothes ( thePlayer, key, clothesType )
  local texture, model = getPedClothes ( source, clothesType )
  if ( texture and model ) then
    outputChatBox ( getPlayerName ( thePlayer ) .. " is wearing " .. texture .. " " .. model .. " on his " .. getClothesTypeName ( clothesType ) )
  end
end
addCommandHandler ( "clothes", getClothes )

See Also