27 if (target_player.IsRestrained())
29 EntityAI item_in_hands_source = source_player.GetItemInHands();
31 ItemBase item_in_hands_target = target_player.GetItemInHands();
36 string item_in_hands_name = item_in_hands_source.GetType();
76 EntityAI item_in_hands_source = player.GetItemInHands();
78 if( other_player.IsRestrained() )
81 EntityAI item_in_hands_target = other_player.GetItemInHands();
85 if( item_in_hands_target )
89 string item_in_hands_name = item_in_hands_source.GetType();
114 EntityAI unrestraining_tool = action_data.m_MainItem;
115 EntityAI restraining_item = player_target.GetItemInHands();
117 player_target.SetRestrained(
false);
126 string item_in_hands_name = unrestraining_tool.GetType();
127 float damageToTool = 0;
139 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, damageToTool);
142 MiscGameplayFunctions.TransformRestrainItem(restraining_item, unrestraining_tool, player_source, player_target);
157 m_OldItem = old_item;
162 super.OnSuccess(new_item);
166 new_item.SetHealth(
"",
"",0);
180 EntityAI newItem = super.CreateNewEntity();
class ActionTargets ActionTarget
const int ECE_PLACE_ON_SURFACE
class OptionSelectorMultistate extends OptionSelector class_name
ref CCIBase m_ConditionItem
bool CanReceiveAction(ActionTarget target)
ref CCTBase m_ConditionTarget
void ActionContinuousBase()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
void ActionUnrestrainTarget()
override void CreateConditionComponents()
float ObtainUnrestrainTime()
const float DEFAULT_UNRESTRAIN_TIME
override void CreateActionComponent()
static ref TStringArray ARRAY_STRING
static ref TFloatArray ARRAY_FLOAT
PlayerBase m_TargetPlayer
override void OnSuccess(EntityAI new_item)
void ReplaceAndDestroyLambda(EntityAI old_item, string new_item_type, PlayerBase player, bool destroy=false)
EntityAI CreateNewEntity()
void ReplaceAndDestroyLambdaEx(EntityAI old_item, string new_item_type, PlayerBase player, bool destroy=false, bool enableDrop=true)
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
const float DEBUG_QUICK_UNRESTRAIN_TIME