DayZ 1.24
Loading...
Searching...
No Matches
ActionOpenBarrel.c
Go to the documentation of this file.
2{
4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_INTERACTONCE;
6 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
7 m_Text = "#open";
8 }
9
10 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
11 {
12 Object target_object = target.GetObject();
13 if (target_object.IsItemBase())
14 {
16 if (ntarget)
17 {
18 if (!ntarget.IsLocked() && !ntarget.IsOpen())
19 return true;
20 }
21 }
22 return false;
23 }
24
26 {
27 Object target_object = action_data.m_Target.GetObject();
29 if (ntarget)
30 ntarget.Open();
31 }
32
34 {
35 Object target_object = action_data.m_Target.GetObject();
37 if (ntarget)
38 ntarget.SoundSynchRemoteReset();
39 }
40}
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
override void OnEndServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnExecuteServer(ActionData action_data)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597