Player::getClothes
This function return a hash of player clothes.
Syntax
Object player.getClothes(Number componentNumber)
List of components:
- 0 - Head
- 1 - Beard
- 2 - Hair
- 3 - Torso
- 4 - Legs
- 5 - Hands
- 6 - Foot
- 7 - None?
- 8 - Accessories like parachute, scuba tank
- 9 - Accessories like bags, mask, scuba mask
- 10- Decals and mask
- 11 - Auxiliary parts for torso
Object keys:
- drawable - ID of clothing.
- texture - ID of texture.
- palette - ID of palette.
Example
This example outputs player clothes for component ID.
mp.events.addCommand('getclothes', (player, text, component) => {
if (component == null || !parseInt(component)) {
return player.outputChatBox('Use syntax: /getclothes [component_id]');
} else {
let clothes = player.getClothes(parseInt(component));
player.outputChatBox('drawable: ' + clothes.drawable + ' texture: ' + clothes.texture + ' palette: ' + palette.texture);
}
});
See also
- Functions
- Player::ban
- Player::call
- Player::callProc
- Player::callToStreamed
- Player::callUnreliable
- Player::cancelPendingRpc
- Player::clearDecorations
- Player::getClothes
- Player::getDecoration
- Player::getFaceFeature
- Player::getHeadBlend
- Player::getHeadOverlay
- Player::getProp
- Player::getWeaponAmmo
- Player::giveWeapon
- Player::hasPendingRpc
- Player::invoke
- Player::isStreamed
- Player::isStreamedFor
- Player::kick
- Player::kickSilent
- Player::notify
- Player::outputChatBox
- Player::playAnimation
- Player::playScenario
- Player::putIntoVehicle
- Player::removeFromVehicle
- Player::removeObject
- Player::removeWeapon
- Player::removeAllWeapons
- Player::resetWeapon
- Player::setClothes
- Player::setCustomization
- Player::setDecoration
- Player::setFaceFeature
- Player::setHairColor
- Player::setHeadBlend
- Player::setHeadOverlay
- Player::setProp
- Player::setWeaponAmmo
- Player::spawn
- Player::stopAnimation
- Player::updateHeadBlend
- Player::enableVoiceTo
- Player::disableVoiceTo
- Weapons::clear
- Entity::destroy
- Entity::dist
- Entity::distSquared
- Entity::getVariable
- Entity::setVariable
- Entity::setVariables
- Properties
- Player::action
- Player::aimTarget
- Player::allWeapons
- Player::armour
- Player::eyeColor
- Player::faceFeatures
- Player::hairColor
- Player::hairHighlightColor
- Player::heading
- Player::health
- Player::rgscId
- Player::ip
- Player::serial
- Player::isAiming
- Player::isClimbing
- Player::isEnteringVehicle
- Player::isInCover
- Player::isInMelee
- Player::isJumping
- Player::isLeavingVehicle
- Player::isOnLadder
- Player::isReloading
- Player::name
- Player::packetLoss
- Player::ping
- Player::seat
- Player::socialClub
- Player::streamedPlayers
- Player::vehicle
- Player::voiceListeners
- Player::disableOutgoingSync
- Player::weapon
- Player::weaponAmmo
- Player::weapons
- Entity::alpha
- Entity::data
- Entity::dimension
- Entity::id
- Entity::model
- Entity::position
- Entity::type