Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VehicleLockControlsAction.c
Go to the documentation of this file.
2{
3 //------------------------------------------------------------------------------------------------
4 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
5 {
6 VehicleControllerComponent controller = VehicleControllerComponent.Cast(m_VehicleController);
7 if (controller)
8 {
9 bool bWantedState = controller.ArePilotControlsLocked();
10 if (RplSession.Mode() != RplMode.Client)
11 bWantedState = !bWantedState;
12 controller.LockPilotControls(bWantedState);
13 }
14 }
15
16 //------------------------------------------------------------------------------------------------
18 override bool GetState()
19 {
20 VehicleControllerComponent controller = VehicleControllerComponent.Cast(m_VehicleController);
21 if (controller)
22 {
23 bool bCurrentState = controller.ArePilotControlsLocked();
24 return bCurrentState;
25 }
26
27 return false;
28 }
29};
RplMode
Mode of replication.
Definition RplMode.c:9
bool GetState()
Current state of the feature.
CompartmentControllerComponent m_VehicleController
@ PerformAction