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