GetClothesTypeName: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 16: | Line 16: | ||
This example gets the current clothes of a certain type on a player, then swaps with the previous in the clothes list. | This example gets the current clothes of a certain type on a player, then swaps with the previous in the clothes list. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler ( " | addCommandHandler ( "clothes?", "getClothes" ) | ||
function | function getClothes ( source, key, clothesType ) | ||
texture, model = getPlayerClothes ( source, clothesType ) | |||
if ( texture and model ) then | |||
if ( | outputChatBox ( getClientName ( source ) .. " is wearing " .. texture .. " " .. model .. " on his " .. getClothesTypeName ( clothesType ) ) | ||
clothesType | |||
end | end | ||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 14:26, 26 July 2006
This function is used to get the name of a certain clothes type.
Syntax
string getClothesTypeName ( int clothesType )
Required Arguments
- clothesType: An interger 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 gets the current clothes of a certain type on a player, then swaps with the previous in the clothes list.
addCommandHandler ( "clothes?", "getClothes" ) function getClothes ( source, key, clothesType ) texture, model = getPlayerClothes ( source, clothesType ) if ( texture and model ) then outputChatBox ( getClientName ( source ) .. " is wearing " .. texture .. " " .. model .. " on his " .. getClothesTypeName ( clothesType ) ) end end
See Also
- addPedClothes
- getBodyPartName
- getClothesByTypeIndex
- getClothesTypeName
- getPedClothes
- getTypeIndexFromClothes
- removePedClothes