Skip to content
← All documentation

/// PIMPMYRUST PLUGIN

VoteCommands

Settings guide for this version of VoteCommands. Check the plugin page before using it on your server.

Prepare your file

  1. Check the installed version

    This guide describes VoteCommands 0.1.3. Use the same version in the configurator.

  2. Import your configuration

    Open the configurator and import your current JSON. For a new installation, you can start from the provided example.

  3. Edit and download

    Adjust the settings, fix reported errors, and download the JSON. Keep a copy of your old file before replacing it.

Your configuration is not saved on the site. Keep the exported file; you can import it again later.

Settings for this version

General 7
Enable
On / off · required

Enable this voting controller. Each configuration file is an independent controller with its own choices and commands.

JSON pathEnabled
Start automatically
On / off · required

Start voting when the plugin loads or reloads.

JSON pathAutomaticStart
Repeat voting sessions
On / off · required

Repeat sessions after the first vote is started, manually or automatically.

JSON pathAutomaticSessions
Automatic start delay (seconds)
Whole number · required

Seconds to wait after the controller loads before the first automatic vote. Used only when automatic start is enabled.

JSON pathDelayBeforeAutomaticStart
Command to start voting
Text · required

Chat command without the leading / character.

JSON pathCommandForStartSessions
Command to open the ballot
Text · required

Chat command without the leading / character.

JSON pathCommandForUi
Interval between session starts (seconds)
Number · required

Time between session starts, not after the result. To repeat votes, it must exceed the voting duration.

JSON pathTimeBetweenSessions

Minimum : 0

Voting duration and choices 2
Voting duration (seconds)
Whole number · required

Time players have to vote, in seconds. At the end the controller resolves the winner; the repeat interval must exceed this duration.

JSON pathCommandsConfiguration → VoteDurationSeconds

Minimum : 10 · Maximum : 3600

Ballot choices
Object list · required

Each choice can have actions that run if it wins. Entered names and commands stay unchanged.

JSON pathCommandsConfiguration → VoteCommands
Close button 2
Size
Whole number · required

Width and height of the legacy interface’s square close button, in CUI reference pixels.

JSON pathUIConfiguration → CloseButtonConfiguration → Size
Image URL
Text · required

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUIConfiguration → CloseButtonConfiguration → ImageUrl
Countdown 4
Minimum anchor
Text · required

Bottom-left corner within the parent container, written as x y from 0 to 1. 0 0 means bottom-left. It must not exceed the maximum anchor; equal anchors may use pixel offsets.

JSON pathUIConfiguration → CountDownConfiguration → AnchorMin
Maximum anchor
Text · required

Top-right corner within the parent container, written as x y from 0 to 1. 1 1 means top-right. It must not precede the minimum anchor; equal anchors may use pixel offsets.

JSON pathUIConfiguration → CountDownConfiguration → AnchorMax
Minimum offset
Text · required

Bottom-left offset, written as x y in pixels, added to the anchor. Negative values move this corner left or down.

JSON pathUIConfiguration → CountDownConfiguration → OffsetMin
Maximum offset
Text · required

Top-right offset, written as x y in pixels, added to the anchor. Positive values move this corner right or up.

JSON pathUIConfiguration → CountDownConfiguration → OffsetMax
Ballot title 1
Height
Number · required

Fraction of window height reserved for the legacy header. Example: 0.1 = 10%. It reduces the remaining room for choices.

JSON pathUIConfiguration → TitleConfiguration → Height
Choice layout 4
Vertical margin
Number · required

Vertical margin around choices as a fraction of window height. Example: 0.01 = 1% on each side.

JSON pathUIConfiguration → VoteCommandsConfiguration → MarginHeight
Horizontal margin
Number · required

Horizontal margin around choices as a fraction of window width. Example: 0.01 = 1% on each side.

JSON pathUIConfiguration → VoteCommandsConfiguration → MarginWidth
Background color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → VoteCommandsConfiguration → BackgroundColor
Spacing between choices
Number · required

Space between choices as a fraction of their container. Example: 0.01 = 1%. More spacing leaves less width for cards.

JSON pathUIConfiguration → VoteCommandsConfiguration → MarginBetweenCommands
Voting window 4
Width
Whole number · required

Legacy window width in CUI reference pixels. Excessive width may exceed smaller screens.

JSON pathUIConfiguration → WindowConfiguration → Width
Height
Whole number · required

Legacy window height in CUI reference pixels. Allow enough room for every ballot choice.

JSON pathUIConfiguration → WindowConfiguration → Height
Background image URL
JSON value · required

Direct address of the image to display, not its web page. Use an image players can access; prefer HTTPS.

JSON pathUIConfiguration → WindowConfiguration → BackgroundImageUrl
Background color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → WindowConfiguration → BackgroundColor
Countdown · Text style 4
Text size
Whole number · required

Text size for this area in the legacy interface. Check readability and overflow using the longest text.

JSON pathUIConfiguration → CountDownConfiguration → LabelConfiguration → FontSize
Text color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → CountDownConfiguration → LabelConfiguration → Color
Font
Text · required

Name of a font available in the Rust client. A font installed only on your PC is not available to players.

JSON pathUIConfiguration → CountDownConfiguration → LabelConfiguration → Font
Text alignment
Whole number · required

Unity alignment: 0–2 = top (left, center, right), 3–5 = middle, 6–8 = bottom. Example: 4 centers the text without moving its panel.

JSON pathUIConfiguration → CountDownConfiguration → LabelConfiguration → TextAnchor
Ballot title · Text style 4
Text size
Whole number · required

Text size for this area in the legacy interface. Check readability and overflow using the longest text.

JSON pathUIConfiguration → TitleConfiguration → LabelConfiguration → FontSize
Text color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → TitleConfiguration → LabelConfiguration → Color
Font
Text · required

Name of a font available in the Rust client. A font installed only on your PC is not available to players.

JSON pathUIConfiguration → TitleConfiguration → LabelConfiguration → Font
Text alignment
Whole number · required

Unity alignment: 0–2 = top (left, center, right), 3–5 = middle, 6–8 = bottom. Example: 4 centers the text without moving its panel.

JSON pathUIConfiguration → TitleConfiguration → LabelConfiguration → TextAnchor
Choice appearance 4
Inner padding
Number · required

Legacy field retained in configuration but unused by the VoteCommands 0.1.3 renderer. Do not rely on it to change spacing.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → Padding
Background color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → BackgroundColor
Vote count area size
Whole number · required

Space reserved for a card’s vote count, in CUI reference pixels.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → VotesCountSize
Image height
Number · required

Fraction of card height reserved for its image. Example: 0.85 = 85%; the remainder is used for the choice name.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → ImageHeight
Choice name style 4
Text size
Whole number · required

Text size for this area in the legacy interface. Check readability and overflow using the longest text.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → NameLabelConfiguration → FontSize
Text color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → NameLabelConfiguration → Color
Font
Text · required

Name of a font available in the Rust client. A font installed only on your PC is not available to players.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → NameLabelConfiguration → Font
Text alignment
Whole number · required

Unity alignment: 0–2 = top (left, center, right), 3–5 = middle, 6–8 = bottom. Example: 4 centers the text without moving its panel.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → NameLabelConfiguration → TextAnchor
Vote count style 4
Text size
Whole number · required

Text size for this area in the legacy interface. Check readability and overflow using the longest text.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → VotesCountLabelConfiguration → FontSize
Text color
Text · required

Rust color: red, green, blue and opacity from 0 to 1, separated by spaces. Example: 1 0.5 0 1 is opaque orange; opacity 0 makes the element invisible.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → VotesCountLabelConfiguration → Color
Font
Text · required

Name of a font available in the Rust client. A font installed only on your PC is not available to players.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → VotesCountLabelConfiguration → Font
Text alignment
Whole number · required

Unity alignment: 0–2 = top (left, center, right), 3–5 = middle, 6–8 = bottom. Example: 4 centers the text without moving its panel.

JSON pathUIConfiguration → VoteCommandsConfiguration → VoteCommandConfiguration → VotesCountLabelConfiguration → TextAnchor

Plugin instructions

Vote Commands 0.1.3 — installation and configuration

This update creates an example on first load, includes complete configurations, and skips winner actions when a session receives no votes.

Install or update

  1. Back up your existing VoteCommands plugin, configurations and language file.
  2. In the server console, run oxide.unload VoteCommands if it is already installed.
  3. Copy the JSON files from this ZIP's oxide/config/VoteCommands/ into the server's matching folder. Do not overwrite any files you have customized: compare them or give new copies different names and unique chat commands.
  4. Copy oxide/lang/en/VoteCommands.json if you do not already have a customized English language file.
  5. Copy oxide/plugins/VoteCommands.cs last. The framework normally loads it automatically; otherwise run oxide.load VoteCommands.
  6. Check the server console for Add VoteCommand Configuration : Example and any errors.

The paths above are relative to the server root for Oxide. On Carbon, use the corresponding carbon/plugins, carbon/config/VoteCommands and carbon/lang/en folders. The plugin uses the framework's configured config directory.

There is no single settings file at `oxide/config/VoteCommands.json`. Each vote has its own JSON file inside oxide/config/VoteCommands/.

If you install only the plugin, version 0.1.3 creates Example.json automatically when that directory contains no JSON files (including subfolders). It also registers default English messages. Existing JSON files are never overwritten. A malformed existing file produces a console error; it is not silently replaced. If all files are disabled, the plugin reports that no enabled votes were loaded.

First test (no winner commands are executed)

The supplied/generated Example.json is enabled, manual, and has all winner actions disabled.

  1. Join as a server administrator.
  2. In game chat, enter /vote_start.
  3. Enter /vote and choose an option.
  4. Wait 60 seconds for the result.
  5. To let ordinary players vote, run this in the server console:
oxide.grant group default VoteCommands.Example.Vote

The permission contains the filename without .json, including its spelling. Rename the permission when you rename a configuration. The start command is administrator-only in this version; granting the registered VoteCommands.Example.Start permission alone does not make a non-admin eligible to start it. Ordinary players can view the ballot but need the Vote permission to participate.

Edit a vote

Edit a complete supplied JSON file; keep its UIConfiguration section. After saving, run oxide.reload VoteCommands. Reloading aborts current sessions without executing their winner actions and resets the schedule.

SettingMeaning
EnabledLoads this vote when true; ignores it when false.
CommandForStartSessionsAdmin chat command, without the leading slash.
CommandForUiChat command that opens this vote's window, without the slash.
CommandsConfiguration.VoteDurationSecondsHow long each voting session lasts, in seconds.
AutomaticStartStarts voting after plugin load/reload when true.
DelayBeforeAutomaticStartDelay after load/reload, in seconds, when AutomaticStart is true.
AutomaticSessionsRepeats sessions once started (manually or automatically).
TimeBetweenSessionsSeconds between session starts, not an extra delay after the previous result. Must exceed the vote duration when repeating.

For a 60-second vote every 20 minutes, set VoteDurationSeconds to 60, TimeBetweenSessions to 1200, and AutomaticSessions to true. Also set AutomaticStart to true if this should begin automatically after loading.

Every enabled file must have a unique filename and two unique chat commands. Disabled or invalid files do not register their commands. Automatic schedules use elapsed time: the skip-night example does not detect sunset automatically.

Options and winner actions

Each entry under CommandsConfiguration.VoteCommands has a name, an image URL, and optional actions. Use direct image URLs; remotely hosted images must remain accessible.

{
  "Name": "Day",
  "ImageUrl": "https://i.postimg.cc/FkmPrP6v/4.png",
  "PluginCallbacks": null,
  "ServerCommands": [
    { "Enabled": true, "Command": "env.time 6" }
  ]
}

This is an option fragment, not a full configuration. A null action list is valid. Each action has its own Enabled flag. Test the exact command in the server console first, then enable it in the configuration.

For a plugin API with a no-argument hook, an option can instead (or also) use:

"PluginCallbacks": [
  { "Enabled": true, "PluginName": "YourPlugin", "PluginCallback": "YourHook" }
]

Replace both placeholders with an installed plugin and a real supported hook. The field is PluginCallbacks (plural); a callback does not accept arguments in this version. Enabled callbacks run before enabled server commands.

Included examples

Only Example.json is enabled by default. Set Enabled to true in a specialized example when you are ready to test it.

  • Example.json — generic three-option, 60-second vote; /vote_start then /vote. All winner commands are disabled.
  • Example_SkipNight.json — /vote_day_start then /vote_day, 60 seconds. Day executes env.time 6; Night leaves time unchanged. Once you enable this file, the Day action is live.
  • Example_NextMapWipe.json — /vote_map_start then /vote_map, 300 seconds. Records the winning map only. It does not change the map, seed or wipe your server.
  • Example_EventManager.json — /vote_event_start then /vote_event, 60 seconds. Requires a compatible EventManager installation and the optional EventManagerWrapper.cs. Copy that adapter into the server plugins folder only if you use EventManager. Configure your events in EventManager first, then replace DeathMatch, GunGame and CaptureTheFlag in the example commands with your actual event names. Vote Commands chooses an event; it does not define EventManager's event types or settings.

For another example, replace Example in the permission command with its filename, e.g. VoteCommands.Example_SkipNight.Vote.

Result behavior and limits

Each player can vote once per session. The option with the highest count wins. A tie between options with votes selects the first tied option in configuration order. If nobody votes, the session ends without a winner and runs no plugin callbacks or server commands. Automatic sessions continue at the configured interval; an empty server does not start an event by itself.

The core plugin requires neither EventManager nor PimpMyCUI. External winner commands/hooks require their owning plugins. The optional EventManager adapter and live UI must be tested against your installed server/plugin versions.

Customer test checklist

  • Confirm version 0.1.3 loads and the example configuration is found (or generated on an otherwise empty installation).
  • Open the generic example as admin, cast a vote, close/reopen the window, and confirm the result.
  • Grant the matching Vote permission and test with a non-admin player.
  • Verify labels, images and countdown in game.
  • In a copy of the generic example with unique chat commands, use a short duration (e.g. 10 seconds), a longer interval (e.g. 20 seconds), and automatic sessions. Confirm at least three successive sessions, then disable it and reload.
  • Try your desired winner command manually, then through one enabled vote.
  • Let an automatic session end with zero votes and confirm that no winner command or plugin callback runs.
  • Report console errors with the configuration filename, VoteCommands version and Oxide/Carbon version. Remove credentials and private server details.

Build contents

oxide/ contains the plugin, four complete example configurations and English messages. optional/ contains the EventManager adapter. CHANGELOG.md lists this patch's changes. Do not install the optional adapter if you do not use EventManager.

Install the file

After keeping a copy of the previous file, place the exported JSON at this location on your server:

oxide/config/VoteCommands/Example.json

Follow the plugin instructions above for dependencies and reloading. Exporting does not connect the site to your server.