54 {
55 if ( !target )
56 return false;
57
60
61 array<int> compLock = item.m_CompatibleLocks;
63
64 if ( target_IB && parent_EAI )
65 {
66
67
68 CarDoor targetDoor = CarDoor.Cast(target_IB);
69 if ( targetDoor )
70 {
71 InventoryLocation loc = new InventoryLocation();
72 bool isPresent = targetDoor.GetInventory().GetCurrentInventoryLocation( loc );
73
74 if ( !isPresent || loc.
GetSlot() == -1 )
75 return false;
76
79 return false;
80 }
81
82
83
84 if ( target_IB.IsLockedInSlot() )
86 else if ( target_IB.IsAlive() )
88 else if ( !target_IB.IsLockedInSlot() )
89 return false;
90
91 targetType = target_IB.GetLockType();
92
93 for (int i = 0; i < compLock.Count(); i++)
94 {
95 if ( targetType == compLock[i] && targetType !=
eLockTypes.NONE)
96 {
97 return true;
98 }
99 }
100 }
101 return false;
102 }
PlayerSpawnPreset slotName
class GP5GasMask extends MaskBase ItemBase
const string UNLOCK_VERSION
const string LOCK_VERSION
proto native int GetSlot()
returns slot id if current type is Attachment