Class Round
A set of tools to handle the round more easily.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public static class Round
Properties
| Improve this Doc View SourceAliveSides
Gets a System.Collections.Generic.IEnumerable<T> indicating the sides that are currently alive.
Declaration
public static IEnumerable<Side> AliveSides { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Side> |
ChangedIntoZombies
Gets or sets the number of players who have been turned into zombies.
Declaration
public static int ChangedIntoZombies { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ChaosTargetCount
Gets or sets a value indicating the amount of Chaos Targets remaining.
Declaration
public static int ChaosTargetCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ElapsedTime
Gets the time elapsed from the start of the round.
Declaration
public static TimeSpan ElapsedTime { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
See Also
| Improve this Doc View SourceEscapedDClasses
Gets or sets the number of players who have escaped as PlayerRoles.RoleTypeId.ClassD.
Declaration
public static int EscapedDClasses { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
EscapedScientists
Gets or sets the number of players who have escaped as PlayerRoles.RoleTypeId.Scientist.
Declaration
public static int EscapedScientists { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
IgnoredPlayers
Gets a list of players who will be ignored from determining round end.
Declaration
public static HashSet<ReferenceHub> IgnoredPlayers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.HashSet<ReferenceHub> |
InProgress
Gets a value indicating whether the round in progress or not.
Declaration
public static bool InProgress { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsEnded
Gets a value indicating whether the round is ended or not.
Declaration
public static bool IsEnded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLobby
Gets a value indicating whether the round is lobby or not.
Declaration
public static bool IsLobby { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLobbyLocked
Gets or sets a value indicating whether the lobby is locked or not.
Declaration
public static bool IsLobbyLocked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLocked
Gets or sets a value indicating whether the round is locked or not.
Declaration
public static bool IsLocked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsStarted
Gets a value indicating whether the round is started or not.
Declaration
public static bool IsStarted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Kills
Gets or sets the number of kills.
Declaration
public static int Kills { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
KillsByScp
Gets or sets the number of kills made by SCPs.
Declaration
public static int KillsByScp { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LobbyWaitingTime
Gets or sets the timer for waiting players in lobby.
Declaration
public static short LobbyWaitingTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
NextRoundAction
Gets or sets the action to do at round end.
Declaration
public static ServerStatic.NextRoundAction NextRoundAction { get; set; }
Property Value
Type | Description |
---|---|
ServerStatic.NextRoundAction |
StartedTime
Gets the start time of the round.
Declaration
public static DateTime StartedTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
See Also
| Improve this Doc View SourceSurvivingSCPs
Gets or sets the number of surviving SCPs.
Declaration
public static int SurvivingSCPs { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
UptimeRounds
Gets the number of rounds since the server started.
Declaration
public static int UptimeRounds { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceEndRound(Boolean)
Forces the round to end, regardless of which factions are alive.
Declaration
public static bool EndRound(bool forceEnd = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forceEnd | Indicates whether or not it'll force the restart with no check if it's locked. |
Returns
Type | Description |
---|---|
System.Boolean | A System.Boolean describing whether or not the round was successfully ended. |
Restart(Boolean, Boolean, ServerStatic.NextRoundAction)
Restarts the round with custom settings.
Declaration
public static void Restart(bool fastRestart = true, bool overrideRestartAction = false, ServerStatic.NextRoundAction restartAction = ServerStatic.NextRoundAction.DoNothing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fastRestart | Indicates whether or not it'll be a fast restart. If it's a fast restart, then players won't be reconnected from the server; otherwise, they will. |
System.Boolean | overrideRestartAction | Overrides a value of ServerStatic.NextRoundAction. Makes sense if someone used a command to set another action. |
ServerStatic.NextRoundAction | restartAction | The ServerStatic.NextRoundAction. ServerStatic.NextRoundAction.DoNothing - does nothing, just restarts the round silently. ServerStatic.NextRoundAction.Restart - restarts the server, reconnects all players. ServerStatic.NextRoundAction.Shutdown - shutdowns the server, also disconnects all players. |
RestartSilently()
Restarts the round silently.
Declaration
public static void RestartSilently()
Start()
Start the round.
Declaration
public static void Start()