40 {
41 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
42 return false;
43
44 Object targetObject = target.GetObject();
45 Object targetParent = target.GetParent();
46 CarDoor carDoor = CarDoor.Cast(targetObject);
47
48 if (!carDoor || !player)
49 return false;
50
52 return true;
53
54 if (carDoor)
55 {
56
57 if (targetParent != null)
58 {
59 InventoryLocation loc = new InventoryLocation();
60 bool isPresent = carDoor.GetInventory().GetCurrentInventoryLocation(loc);
61
62 if (!isPresent || loc.
GetSlot() == -1)
63 return false;
64
67 return false;
68 }
69
70
71 int zoneHP = carDoor.GetHealthLevel("");
72 return zoneHP > GameConstants.STATE_WORN && zoneHP < GameConstants.STATE_RUINED);
73 }
74
75 return false;
76 }
PlayerSpawnPreset slotName
proto native int GetSlot()
returns slot id if current type is Attachment
proto native CGame GetGame()