78 {
79 bool weapon_present;
80 bool melee_present;
81 bool backpack_present;
82 HumanInventory inventory;
83
84 if (
GetDayZGame().GetGameState() != DayZGameState.IN_GAME )
85 {
86 return;
87 }
88
90 if (!player)
91 {
92 return;
93 }
94
95 inventory = player.GetHumanInventory();
96
97 if ( player && inventory )
98 {
100 {
101 int slot_id = InventorySlots.GetSlotIdFromString(
m_FullGear[i]);
103
104 if ( !att_item )
105 {
106
107 continue;
108 }
109
110
111 if (att_item.IsWeapon())
112 weapon_present = true;
113
114 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(InventorySlots.GetSlotIdFromString("Melee")))
115 melee_present = true;
116
117 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(InventorySlots.GetSlotIdFromString("Back")))
118 backpack_present = true;
119
120 }
121
122
124 if ( att_item )
125 {
126
127 if (att_item.IsWeapon())
128 weapon_present = true;
129
130 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(InventorySlots.GetSlotIdFromString("Melee")) )
131 melee_present = true;
132
133 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(InventorySlots.GetSlotIdFromString("Back")))
134 backpack_present = true;
135 }
136
137 if (weapon_present && melee_present && backpack_present)
138 {
139
140 Achievements.OnEquippedFullGear();
141 }
142 }
143 }
static string m_FullGear[GEAR_COUNT]
static const int GEAR_COUNT
proto native DayZPlayer GetPlayer()
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
proto native EntityAI GetEntityInHands()
proto native CGame GetGame()