- Documentation
- Server functions
- getClothesByTypeIndex
Function
getClothesByTypeIndex
Returns the texture and model of clothing number index of a type, from the table loaded with setClothesData.
Syntax
string, string getClothesByTypeIndex(int clothesType, int clothesIndex)Arguments
clothesTypeint- Type 0-17.
clothesIndexint- Clothing number counted from 0.
Returns
Texture and model or false.
Example
local texture, model = getClothesByTypeIndex(0, 0)
if texture then addPedClothes(player, texture, model, 0) end
See also
setClothesDataLoads your own clothing table forgetClothesByTypeIndexandgetTypeIndexFromClothes: a type (as a string"0"-"17") -> a list of{ texture, model }. Without it both functions returnfalse.getTypeIndexFromClothesReturns the type and number of a clothing item by its texture and model, from the table loaded withsetClothesData.