Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_VotingAdmin.c
Go to the documentation of this file.
1
[
BaseContainerProps
(configRoot:
true
),
SCR_BaseContainerCustomTitleEnum
(
EVotingType
,
"m_Type"
)]
2
class
SCR_VotingAdmin
:
SCR_VotingReferendum
3
{
4
//------------------------------------------------------------------------------------------------
5
override
bool
IsAvailable(
int
value,
bool
isOngoing)
6
{
7
//--- Cannot vote admin when the session is hosted
8
SCR_VotingManagerComponent
votingManager =
SCR_VotingManagerComponent
.GetInstance();
9
return
votingManager && votingManager.GetHostPlayerID() == 0;
10
}
11
12
//------------------------------------------------------------------------------------------------
13
override
void
OnVotingEnd(
int
value =
DEFAULT_VALUE
,
int
winner =
DEFAULT_VALUE
)
14
{
15
if
(winner !=
DEFAULT_VALUE
)
16
GetGame
().GetPlayerManager().GivePlayerRole(winner,
EPlayerRole
.SESSION_ADMINISTRATOR);
17
}
18
}
EPlayerRole
EPlayerRole
Definition
EPlayerRole.c:8
EVotingType
EVotingType
Definition
EVotingType.c:2
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition
SCR_CampaignHintStorage.c:22
SCR_VotingManagerComponent
void SCR_VotingManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_VotingManagerComponent.c:1083
SCR_VotingAdmin
Definition
SCR_VotingAdmin.c:3
SCR_VotingBase::DEFAULT_VALUE
static const int DEFAULT_VALUE
Definition
SCR_VotingBase.c:49
SCR_VotingReferendum
Definition
SCR_VotingBase.c:464
scripts
Game
Components
Voting
SCR_VotingAdmin.c
Generated by
1.17.0