236 {
237 if (CanEquip())
238 {
239 if (m_ActiveIndex == 0)
240 {
242 if ( item_in_hands )
243 {
245 if (player && player.GetHumanInventory().CanRemoveEntityInHands() && !player.GetInventory().HasInventoryReservation(item_in_hands, null))
246 {
247 bool res = player.PredictiveTakeOrSwapAttachment(item_in_hands);
248 if (!res)
249 {
251 }
252 if (res)
253 {
254 m_MainWidget.FindAnyWidget("Cursor").Show(false);
255 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha(0.7);
256 return true;
257 }
258 }
259 }
260 }
261 else if (GetFocusedContainer())
262 {
263 return GetFocusedContainer().EquipItem();
264 }
265 }
266 return false;
267 }
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
proto native DayZPlayer GetPlayer()
proto native CGame GetGame()