GetClothesTypeName
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 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 ( "previousClothes", "previousClothes" ) function nextClothes ( player, key, clothesType ) currentTexture, currentModel = getPlayerClothes ( source, clothesType ) -- get the current clothes on this slot clothesIndex = 1 if ( currentTexture ) then -- if he had clothes of that type clothesType, clothesIndex = getTypeIndexFromClothes ( currentTexture, currentModel ) -- get the type and index of these clothes, so we can decrease and get the previous end clothesIndex = clothesIndex - 1 texture, model = getClothesByTypeIndex ( type, index ) -- get the new texture and model setPlayerClothes ( source, texture, model, type ) end
See Also
- addPedClothes
- getBodyPartName
- getClothesByTypeIndex
- getClothesTypeName
- getPedClothes
- getTypeIndexFromClothes
- removePedClothes