I am not sure if this is a bug but i realized a starnge behavior wirth the CreateInInventory function under following conditions:
1. I Created a custom clothing item that can be attached to the player with its config class (in this example its a black shirt):
```
class CfgPatches
{
class Sample_Tops
{
units[]=
{
"Shirt_CheckRed",
"Hoodie_Blue",
"Hoodie_Black",
"Hoodie_Brown",
"Hoodie_Green",
"Hoodie_Grey",
"Hoodie_Red",
"MaleTorso",
"FemaleTorso"
};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = { "DZ_Characters" };
};
};
class CfgVehicles
{
class TShirt_ColorBase;
class TShirt_Sample: TShirt_ColorBase
{
scope=2;
displayName="Sample Shirt";
descriptionShort="Sample Shirt";
visibilityModifier=0.85000002;
hiddenSelectionsTextures[]=
{
"\DZ\characters\tops\Data\tshirt_ground_black_co.paa",
"\DZ\characters\tops\Data\tshirt_black_co.paa",
"\DZ\characters\tops\Data\tshirt_black_co.paa"
};
};
};
```
2. Tried to attach and create the item on the player character in the EquipCharacter fucntion within the MissionServer class like this:
```
modded class MissionServer
{
override void EquipCharacter()
{
m_player.GetInventory().CreateInInventory("TShirt_Sample");
StartingEquipSetup(m_player, false);
}
}
```
**With this the character will never spawn in with this item attached to his body (top slot) at all.**
If i spawn the shirt in the world the character can see and wear the shirt just fine.
**Only when i added a scripted class for the item CreateInInventory will work and the player spawns in with the shirt attached to his body:**
```
class TShirt_Sample extends TShirt_ColorBase {};
```