Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TurnOnAction.c
Go to the documentation of this file.
2{
3 //---------------------------------------------------------
4 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
5 {
6 RadioBroadcastComponent broadcastComponent = GetRadioBCComponent();
7 if (broadcastComponent)
8 {
9 if(broadcastComponent.GetState())
10 broadcastComponent.EnableRadio(false);
11 else
12 broadcastComponent.EnableRadio(true);
13 }
14 }
15
16 //------------------------------------------------------------------------------------------------
17 override bool CanBePerformedScript(IEntity user)
18 {
19 RadioBroadcastComponent broadcastComponent = GetRadioBCComponent();
20 if (broadcastComponent)
21 return true;
22
23 return false;
24 }
25
26 //------------------------------------------------------------------------------------------------
27 override bool CanBroadcastScript()
28 {
29 return false;
30 }
31
32 //------------------------------------------------------------------------------------------------
33 override bool GetActionNameScript(out string outName)
34 {
35 RadioBroadcastComponent broadcastComponent = GetRadioBCComponent();
36 if (!broadcastComponent)
37 return false;
38
39 if (broadcastComponent.GetState())
40 outName = "#AR-UserAction_TurnOff";
41 else
42 outName = "#AR-UserAction_TurnOn";
43
44 return true;
45 }
46};
override bool CanBroadcastScript()
@ PerformAction