6182 {
6183 #ifdef SERVER
6184 Clothing item;
6185 GameInventory inventory = GetInventory();
6186 Class.CastTo(item, inventory.
FindAttachment(InventorySlots.MASK));
6187 if (!item)
6188 {
6189 Class.CastTo(item, inventory.
FindAttachment(InventorySlots.HEADGEAR));
6190 }
6191
6192 if (item && item.IsObstructingVoice())
6193 {
6194 item.MutePlayer(this,true);
6195 }
6196 else
6197 {
6198 g_Game.SetVoiceEffect(
this, VoiceEffectMumbling,
false);
6199 g_Game.SetVoiceEffect(
this, VoiceEffectObstruction,
false);
6200 }
6201 #endif
6202 }
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)