DayZ 1.24
Loading...
Searching...
No Matches
ActionTurnOnTransmitterOnGround.c
Go to the documentation of this file.
2{
4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENDOORFW;
6 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
7 m_Text = "#turn_on";
8 }
9
10 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
11 {
12 Object target_object = target.GetObject();
13 if (player && target_object && target_object.IsStaticTransmitter())
14 {
16 string selection = target_object.GetActionComponentName(target.GetComponentIndex());
17
18 if (target_entity.HasEnergyManager() && target_entity.GetCompEM().CanSwitchOn() && selection == "power_panel")
19 {
21 //transmitter.DisplayRadioInfo( "OFF", player );
22
23 return true;
24 }
25 }
26
27 return false;
28 }
29
31 {
33 transmitter.TurnOnTransmitter();
34 }
35}
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnExecuteServer(ActionData action_data)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597