A flexible SourceMod plugin for organizing vetos.
sm_veto <preset> [participants...]
- Starts a veto with the specified preset and participantssm_veto_list
- Lists all active vetossm_veto_cancel <id>
/sm_veto_abort <id>
- Cancels an ongoing vetosm_veto_presets_reload
- Reloads presets from the file
vetoable_vote_timeout
- Voting time players have until a random action is chosen
- Download the latest release from the releases
- Extract the zip file into
/csgo/
(root game directory) of your gameserver - Optionally adjust
/csgo/cfg/sourcemod/vetoable-presets.cfg
to your liking- See below for examples of configuration
- The preset name will be used in the
sm_veto
command - Presets can define as many items and actions as they want
- Action type must be either
ban
orpick
- Action with voter as
0
is considered non-interactable and will be chosen by random
Each preset in the file follows the format:
"Preset name"
{
"items"
{
"item1" "Item 1"
"item2" "Item 2"
"item3" "Item 3"
"item4" "Item 4"
"item5" "Item 5"
}
"actions"
{
"pick" "1"
"pick" "2"
"ban" "1"
"ban" "2"
"pick" "0"
}
}
Vetoable exposes a Plugin API for interacting with vetos
Examples could be:
- Providing alternative ways of creating and starting vetos
- Announcing results (see following for examples)
Example plugin:
#include <vetoable>
public void OnPluginStart()
{
RegConsoleCmd("sm_randomveto", Command_VetoRandom, "Starts a veto with random actions");
}
public Action Command_VetoRandom(int client, int args)
{
VetoableVeto veto = VetoableVeto("Random 3");
// Add three random picks
// Voter 0 is non-interactable and will be random
veto.AddAction(VetoActionType_Pick, 0);
veto.AddAction(VetoActionType_Pick, 0);
veto.AddAction(VetoActionType_Pick, 0);
// Add 9 items
veto.AddItem("Item 1");
veto.AddItem("Item 2");
veto.AddItem("Item 3");
veto.AddItem("Item 4");
veto.AddItem("Item 5");
veto.AddItem("Item 6");
veto.AddItem("Item 7");
veto.AddItem("Item 8");
veto.AddItem("Item 9");
veto.Start();
return Plugin_Handled;
}