6463 {
6464 #ifdef SERVER
6466 GameInventory inventory = GetInventory();
6467 Class.CastTo(item, inventory.
FindAttachment(InventorySlots.MASK));
6468 if (!item)
6469 {
6470 Class.CastTo(item, inventory.
FindAttachment(InventorySlots.HEADGEAR));
6471 }
6472
6473 if (item && item.IsObstructingVoice())
6474 {
6475 item.MutePlayer(this,true);
6476 }
6477 else
6478 {
6479 g_Game.SetVoiceEffect(
this, VoiceEffectMumbling,
false);
6480 g_Game.SetVoiceEffect(
this, VoiceEffectObstruction,
false);
6481 }
6482 #endif
6483 }
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)