DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionForceDrink.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7};
8
10{
12 {
13 m_CallbackClass = ActionForceDrinkCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
17 m_Text = "#give_drink";
18 }
19
21 {
24 }
25
26 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
27 {
28 if (!super.ActionCondition( player, target, item))
29 return false;
30
31 PlayerBase target_player = PlayerBase.Cast(target.GetObject());
32
33 if (target_player)
34 return target_player.CanEatAndDrink();
35 else
36 return false;
37 }
38
39};
40
41
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
ActionForceConsumeCB ActionContinuousBaseCB ActionForceConsume()
class ActionTargets ActionTarget
protected ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition CCTMan.c:2
const float DEFAULT
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602