Mission Voting – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "==Server Voting== Documentation for server-side voting settings (since 1.39 DEV) ===Global voting settings=== Global voting settings are used if no voting threshold defined i...")
 
(formatting)
Line 46: Line 46:


Commands available for voted admins:
Commands available for voted admins:
:allowedVotedAdminCmds[] = {
<syntaxhighlight lang=cpp>
:{"mission", true, true}, //
allowedVotedAdminCmds[] =  
:{"missions", true, true}, //
{
:{"restart", true, true}, //
{"mission", true, true},
:{"reassign", true, true}, //
{"missions", true, true},
:{"kick", true, true} //
{"restart", true, true},
:};
{"reassign", true, true},
{"kick", true, true}
};
 
</syntaxhighlight>
----
----

Revision as of 16:53, 10 July 2017

Server Voting

Documentation for server-side voting settings (since 1.39 DEV)

Global voting settings

Global voting settings are used if no voting threshold defined in allowedVoteCmds or/and allowedVotedAdminCmds

voteThreshold = <number>; // Percentage of votes needed to confirm a vote.
voteMissionPlayers = <number>; //Start mission-voting when X numberOfPlayers connect.


FORMAT

allowedVoteCmds[] = {{<commandName>, <preMissionStart>, <postMissionStart>, <votingThreshold>}, ...};, where:
  • <commandName>: String - name of the command, for example "admin"
  • <preMissionStart> (Optional): Boolean - true to allow command before mission start. Default: true
  • <postMissionStart> (Optional): Boolean - true to allow command after mission start. Default: true
  • <votingThreshold> (Optional): Number - voting threshold 0...1. Default: value assigned to voteThreshold param. Otherwise 0.5
Not using/specifying allowedVoteCmds[] param at all means every voting command is allowed!

Example1:

allowedVoteCmds[] = {}; // voting is disabled (not a single command is allowed)

Example2:

allowedVoteCmds[] = 
{
	{"admin"}, // will default to {"admin", true, true, 0.5}
	{"missions", true, false, 0.5}, // not available after mission start
	{"mission", true, true}, // will use global <tt>voteThreshold</tt>
	{"kick", false, false, 0.75}, // not available at all
	{"restart", true, true, -1}, // invalid threshold value. Will default to global <tt>voteThreshold</tt>
	{"reassign", false, true, 0.5} // not available before mission start
};

allowedVotedAdminCmds

Definition of available commands for voted-in admins (this doesn't affect abilities of normal server admins)
allowedVotedAdminCmds[] = { { "CMD1", pre-init, post-init },{ "CMD2", pre-init, post-init }, ... ,{ "CMDn", pre-init, post-init }};

Second and third parameter are optional. If not specified otherwise, they are true by default. (pre-init means prior to mission start, post-init means after a mission started)

Not listing any command ( allowedVotedAdminCmds[] = {}; ) means such commands are disabled for voted-in admin.
Not specifing allowedVotedAdminCmds at all means everything is allowed anytime for voted-in admin!

Commands available for voted admins:

allowedVotedAdminCmds[] = 
{
	{"mission", true, true},
	{"missions", true, true},
	{"restart", true, true},
	{"reassign", true, true},
	{"kick", true, true}
};