-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathIMcsMapVoteControllerApi.cs
More file actions
49 lines (38 loc) · 1.55 KB
/
Copy pathIMcsMapVoteControllerApi.cs
File metadata and controls
49 lines (38 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using CounterStrikeSharp.API.Core;
namespace MapChooserSharp.API.MapVoteController;
/// <summary>
/// MapVoteController API
/// </summary>
public interface IMcsMapVoteControllerApi
{
/// <summary>
/// Current state of vote <see cref="McsMapVoteState"/>
/// </summary>
public McsMapVoteState CurrentVoteState { get; }
/// <summary>
/// Initiate a map vote.
/// </summary>
/// <param name="isActivatedByRtv">If true, first option is "don't change", if false then "Extend Current Map"</param>
/// <returns>McsMapVoteState.InitializeAccepted if successfully initiated, otherwise it's state of current vote</returns>
public McsMapVoteState InitiateVote(bool isActivatedByRtv = false);
/// <summary>
/// Cancel the current vote.
/// </summary>
/// <returns>McsMapVoteState.Cancelling if successfully canceled, otherwise it's state of current vote</returns>
public McsMapVoteState CancelVote(CCSPlayerController? player);
/// <summary>
/// Remove player's vote from the current vote.
/// </summary>
/// <param name="player">Player Controller</param>
public void RemovePlayerVote(CCSPlayerController player);
/// <summary>
/// Remove player's vote from the current vote.
/// </summary>
/// <param name="slot">Player slot</param>
public void RemovePlayerVote(int slot);
/// <summary>
/// Removes player vote and show vote menu to player
/// </summary>
/// <param name="player">Player Controller</param>
public void PlayerReVote(CCSPlayerController player);
}