GameModeManager.Shared
1.0.63
dotnet add package GameModeManager.Shared --version 1.0.63
NuGet\Install-Package GameModeManager.Shared -Version 1.0.63
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GameModeManager.Shared" Version="1.0.63" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GameModeManager.Shared" Version="1.0.63" />
<PackageReference Include="GameModeManager.Shared" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GameModeManager.Shared --version 1.0.63
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GameModeManager.Shared, 1.0.63"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GameModeManager.Shared@1.0.63
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GameModeManager.Shared&version=1.0.63
#tool nuget:?package=GameModeManager.Shared&version=1.0.63
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GameModeManager provides a Shared API for other plugins to manage game modes. Add a reference to GameModeManager.Shared in your project using one of the methods below to get started!
- Download the source code and build it yourself.
- Download the latest release from the releases page.
- Install the package using the .NET CLI, run:
dotnet add package GameModeManager.Shared.
Example Usage
// Included libraries
using GameModeManager.Shared;
using CounterStrikeSharp.API.Core.Capabilities;
// Declare namespace
namespace Plugin;
public class Plugin : BasePlugin
{
public PluginCapability<IRTVApi> RTVApi { get; } = new("rtv:api");
public PluginCapability<IGameModeApi> GameModeApi { get; } = new("game_mode:api");
public PluginCapability<ITimeLimitApi> TimeLimitApi { get; } = new("time_limit:api");
List<IMap> Maps = GameModeApi.Get().State.Maps;
List<IMode> Modes = GameModeApi.Get().State.Modes;
private IMap Map = Maps.FirstOrDefault(m => m.Name.Equals("de_dust2", StringComparison.OrdinalIgnoreCase));
private IMode Mode = Modes.FirstOrDefault().FirstOrDefault(m => m.Name.Equals("Scoutzknivez", StringComparison.OrdinalIgnoreCase));
GameModeApi.Get().Control.ChangeMap(Map);
GameModeApi.Get().Control.ChangeMode(Mode);
int Seconds = 120;
RTVApi.Get().Control.SetDuration(Seconds);
TimeLimitApi.Get().Control.Enforce();
TimeLimitApi.Get().Control.CustomLimit (Seconds);
TimeLimitApi.Get().Control.Disable();
private string Message = TimeLimitApi.Get().Messaging.TimeLimitMessage();
}
Interfaces
GameModeApi
public interface IGameState
{
List<IMap> Maps { get; }
List<IMode> Modes { get; }
IMap CurrentMap { get; }
IMode WarmupMode { get; }
IMode CurrentMode { get; }
List<ISetting> Settings { get; }
List<IMapGroup> MapGroups { get; }
bool WarmupScheduled { get; }
}
public interface IGameModeControl
{
void TriggerRotation();
void ChangeMode(IMode mode);
void ChangeMap(IMap map, int delay);
}
public interface IWarmupControl
{
bool ScheduleWarmup(IMode mode);
}
public interface IGameModeApi
{
IGameState State { get; }
IGameModeControl Control { get; }
IWarmupControl Warmup { get; }
}
RTVApi
public interface IRTVState
{
IMap? NextMap { get; }
int Duration { get; }
bool Enabled { get; }
IMode? NextMode { get; }
bool EndOfMapVote { get; }
bool IncludeExtend { get; }
int KillsBeforeEnd { get; }
int RoundsBeforeEnd { get; }
bool EofVoteHappened { get; }
int SecondsBeforeEnd { get; }
bool NominationEnabled { get; }
bool EofVoteHappening { get; }
bool ChangeImmediately { get; }
int MaxNominationWinners { get; }
}
public interface IRTVControl
{
void Enable();
void Disable();
IRTVControl SetDuration(int duration);
IRTVControl SetRoundsBeforeEnd(int rounds);
IRTVControl SetKillsBeforeEnd(int kills);
IRTVControl SetSecondsBeforeEnd(int seconds);
IRTVControl SetEndOfMapVote(bool endOfMapVote);
IRTVControl SetIncludeExtend(bool includeExtend);
IRTVControl SetChangeImmediately(bool changeImmediately);
}
public interface IRTVNomination
{
bool NominationEnabled { get; }
int MaxNominationWinners { get; }
IRTVNomination SetNominationEnabled(bool nominationEnabled);
IRTVNomination SetMaxNominationWinners(int maxNominationWinners);
}
public interface IRTVApi
{
IRTVState State { get; }
IRTVControl Control { get; }
IRTVNomination Nomination { get; }
}
TimeLimitApi
public interface ITimeLimitState
{
int MaxWins { get; }
float TimeLimit { get; }
bool Custom { get; }
bool Enabled { get; }
bool Scheduled { get; }
decimal TimePlayed { get; }
int RemainingWins { get; }
bool UnlimitedTime { get; }
bool UnlimitedRounds { get; }
decimal TimeRemaining { get; }
}
public interface ITimeLimitControl
{
void Enforce();
void Disable();
void CustomLimit(int time);
}
public interface ITimeLimitMessaging
{
string TimeLeftMessage();
}
public interface ITimeLimitApi
{
ITimeLimitState State { get; }
ITimeLimitControl Control { get; }
ITimeLimitMessaging Messaging { get; }
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- CounterStrikeSharp.API (>= 1.0.362)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.63 | 129 | 2/15/2026 |