23 {
24 PlayerBase target_player = PlayerBase.Cast(
m_ActionData.m_Target.GetObject());
26
27 if (target_player.IsRestrained())
28 {
29 EntityAI item_in_hands_source = source_player.GetItemInHands();
30
31 ItemBase item_in_hands_target = target_player.GetItemInHands();
32
33 CachedObjectsArrays.ARRAY_STRING.Clear();
34 item_in_hands_target.ConfigGetTextArray( "CanBeUnrestrainedBy", CachedObjectsArrays.ARRAY_STRING );
35
36 string item_in_hands_name = item_in_hands_source.GetType();
37
38 for(int i = 0; i < CachedObjectsArrays.ARRAY_STRING.Count(); i++)
39 {
40 if((i % 2) == 0)
41 {
42 string class_name = CachedObjectsArrays.ARRAY_STRING.Get(i);
44 {
45 float value = CachedObjectsArrays.ARRAY_STRING.Get(i+1).ToFloat();
46 return value;
47 }
48 }
49 }
50 }
51 return -1;
52 }
class GP5GasMask extends MaskBase ItemBase
class OptionSelectorMultistate extends OptionSelector class_name
proto native CGame GetGame()