Callvote.EXILED
6.8.0
dotnet add package Callvote.EXILED --version 6.8.0
NuGet\Install-Package Callvote.EXILED -Version 6.8.0
<PackageReference Include="Callvote.EXILED" Version="6.8.0" />
<PackageVersion Include="Callvote.EXILED" Version="6.8.0" />
<PackageReference Include="Callvote.EXILED" />
paket add Callvote.EXILED --version 6.8.0
#r "nuget: Callvote.EXILED, 6.8.0"
#:package Callvote.EXILED@6.8.0
#addin nuget:?package=Callvote.EXILED&version=6.8.0
#tool nuget:?package=Callvote.EXILED&version=6.8.0
Callvote
The sucessor of callvote.
A plugin that allows calling and vote for Kick, RestartRound, Kill, RespawnWave, FriendlyFire, or Custom Votes using KEYBINDS or CONSOLE COMMANDS in the same format as the Source Engine (Left 4 Dead 2/Counter-Strike: Global Offensive).
If you want to develop using Callvote, please install the EXILED Nuget Package or LabAPI Nuget Package
Examples
VoteHandler.CreateVoteOption("command", "<color=red>detail</color>", out _);
VoteHandler.CreateVoteOption("command2", "<color=green>detail2</color>", out _);
VoteHandler.CallVote(new CustomVote(player, $"<color=#D681DE>question</color>", "CallvoteExample.Template"));
VoteHandler.CallVote(new CustomVote(player, $"{player.Nickname} asks: Enable FF?", "CallvoteExample.FF", new FFVote(player)));
private void ReviveSCPs(DiedEventArgs ev)
{
if (ev.Player.IsScp)
{
void Callback(Vote vote)
{
if (vote is not BinaryVote binaryVote)
{
return;
}
int yesPercentage = vote.GetVoteOptionPercentage(binaryVote.YesVoteOption);
int noPercentage = vote.GetVoteOptionPercentage(binaryVote.NoVoteOption);
if (yesPercentage > noPercentage)
{
ev.Player.RoleManager.ServerSetRole(ev.TargetOldRole, PlayerRoles.RoleChangeReason.None);
Map.Broadcast(5, $"{ev.TargetOldRole} respawned.");
return;
}
Map.Broadcast(5, "The Vote Failed.");
}
BinaryVote reviveSCP = new BinaryVote(Server.Host, $"Revive {ev.TargetOldRole}?", $"NothingBurguerPlugin.Respawn", Callback);
VoteHandler.CallVote(reviveSCP);
}
}
Documentation
Download
This plugin requires Exiled or LabAPI.
You can download the latest version of Callvote here.
Soft Depedencies
Replaces Broadcasts with Hints.
❗️ Do not install both — they are incompatible with each other.
HintServiceMeow — You can download it here.HSM is deprecated.
Special thanks to:
https://github.com/Playeroth and https://github.com/Edi369 for helping me with translations and adding webhook functionality.
https://github.com/PatPeter for giving the permission to continue the development of callvote.
https://github.com/vladflotsky for giving adivice and guidance while I was rewritting the plugin.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- ExMod.Exiled (>= 9.12.6)
- Lib.Harmony (>= 2.2.2)
- Northwood.LabAPI (>= 1.1.5)
- RueI (>= 3.1.2)
- System.Net.Http (>= 4.3.4)
- YamlDotNet (>= 16.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.