Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_KickPlayerContextAction.c
Go to the documentation of this file.
3 {
4  [Attribute("0", desc: "How long before kicked-out player can reconnect.\n-1 means permanent ban (at least until exe restart)")]
5  protected int m_iKickTimeout;
6 
7  [Attribute(uiwidget: UIWidgets.SearchComboBox, desc: "Reason for kicking shown to kicked-out player.", enums: ParamEnumArray.FromEnum(SCR_PlayerManagerKickReason))]
8  protected SCR_PlayerManagerKickReason m_KickReason;
9 
10  //------------------------------------------------------------------------------------------------
11  override bool CanBeShown(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
12  {
13  SCR_EditablePlayerDelegateComponent playerDelegate = SCR_EditablePlayerDelegateComponent.Cast(selectedEntity);
14  return playerDelegate && !SCR_Global.IsAdmin(playerDelegate.GetPlayerID());
15  }
16 
17  //------------------------------------------------------------------------------------------------
18  override bool CanBePerformed(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
19  {
20  return CanBeShown(selectedEntity, cursorWorldPosition, flags);
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
25  {
26  SCR_EditablePlayerDelegateComponent playerDelegate;
27  foreach (SCR_EditableEntityComponent entity: selectedEntities)
28  {
29  playerDelegate = SCR_EditablePlayerDelegateComponent.Cast(entity);
30  if (playerDelegate)
31  {
32  GetGame().GetPlayerManager().KickPlayer(playerDelegate.GetPlayerID(), m_KickReason, m_iKickTimeout);
33  }
34  }
35  }
36 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_Global
Definition: Functions.c:6
SCR_SelectedEntitiesContextAction
Definition: SCR_SelectedEntitiesContextAction.c:10
SCR_KickPlayerContextAction
Definition: SCR_KickPlayerContextAction.c:2
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468