Map Vote "Did you mean?" is best suited for servers who wish to allow players to vote for any layer in a large pool of options as it allows players to vote by specifying the layer name in chat. It uses a "did you mean?" algorithm to correct misspelling in layer names making it easier for players to vote.
alwaysOn: true, // map vote will start without admin interaction if true
minPlayerCount: null, // this number of players must be online before they can vote. null is off
minVoteCount: null, // this number of votes must be counted before a layer is selected. null is off
}
);
```
## Map Vote "123"
### About
Map Vote "123" is best suited for servers who want to allow admins to create map votes that allow players to easily choose from a small selection of layers.
Commands:
*`!mapvote help` - Shows other commands players can use.
*`!mapvote results` - See the map vote results.
*`<layer number>` - Vote for a specific layer via it's associated number.
*`!mapvote start <layer name 1>, <layer name 2>` (Admin chat only) - Starts a new map vote.
*`!mapvote restart` (Admin chat only) - Restarts a map vote with the same layers.
*`!mapvote end` (Admin chat only) - Ends a map vote and announces the winner.
*`!mapvote destroy` (Admin chat only) - End a map vote without announcing the winner.
### Installation
Add the following two lines at the top of your index.js file to import the required components:
```js
import SquadLayerFilter from 'connectors/squad-layer-filter';
import { mapvote } from 'plugins';
```
Setup the map vote plugin:
```js
mapvote(
server,
'123',
{
minVoteCount: null, // this number of votes must be counted before a layer is selected. null is off