diff --git a/GoSpec.cs b/GoSpec.cs index 8d281f9..912780e 100644 --- a/GoSpec.cs +++ b/GoSpec.cs @@ -9,14 +9,14 @@ public class GoSpec : BasePlugin { public override string ModuleName => "GoSpec"; public override string ModuleAuthor => "cosmic sans"; - public override string ModuleVersion => "1.2"; + public override string ModuleVersion => "1.1"; public override void Load(bool hotReload) { Console.WriteLine($"{ModuleName} version {ModuleVersion} by {ModuleAuthor} is active."); } - [ConsoleCommand("css_spec", "Moves you to spec.")] + [ConsoleCommand("spec", "Moves you to spec.")] [CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)] public void OnSpecCommand(CCSPlayerController? caller, CommandInfo command) { @@ -37,14 +37,14 @@ public class GoSpec : BasePlugin public void OnBRBCommand(CCSPlayerController? caller, CommandInfo command) => OnSpecCommand(caller, command); #endregion - [ConsoleCommand("css_ct", "Joins the counterterrorist team.")] + [ConsoleCommand("ct", "Joins the counterterrorist team.")] [CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)] public void OnJoinCTCommand(CCSPlayerController? caller, CommandInfo command) { ChangeTeam(caller, CsTeam.CounterTerrorist); } - [ConsoleCommand("css_t", "Joins the terrorist team.")] + [ConsoleCommand("t", "Joins the terrorist team.")] [CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)] public void OnJoinTCommand(CCSPlayerController? caller, CommandInfo command) { @@ -61,7 +61,7 @@ public class GoSpec : BasePlugin return false; } - if (!IsUnassigned(caller) && moveTo != CsTeam.Spectator) + if (!IsInSpec(caller) && moveTo != CsTeam.Spectator) { caller.PrintToChat($"{ChatColors.Red}You must be in spec to use this command."); return false; @@ -94,12 +94,6 @@ public class GoSpec : BasePlugin return count; } - private bool IsUnassigned(CCSPlayerController? caller) - { - if (caller == null) return false; - return caller.TeamNum != (int)CsTeam.Terrorist && caller.TeamNum != (int)CsTeam.CounterTerrorist; - } - private bool IsInSpec(CCSPlayerController? caller) { if (caller == null) return false; diff --git a/README.md b/README.md index 39bddf2..c565172 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# GoSpec v1.1 -CounterStrikeSharp plugin for allowing players to move themselves to spec by typing **!spec** in chat. +# GoSpec v1.0 +CounterStrikeSharp plugin for allowing players to move themselves to spec by typing **!spec** in chat or **css_spec** in console. ## Installation 1. Install [CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp) and [Metamod](https://www.sourcemm.net/) @@ -8,8 +8,4 @@ CounterStrikeSharp plugin for allowing players to move themselves to spec by typ 4. Move `GoSpec` folder into your server's `addons/counterstrikesharp/plugins` folder. ## Commands -`css_spec`: `!spec` in chat to move to spec [_Alternatives:_ `!s`, `!afk`, `!brb`] - -`css_ct`: `!ct` in chat to join ct from spec/unassigned - -`css_t`: `!t` in chat to join t from spec/unassigned +**Spec:** `!spec` in chat to move to spec diff --git a/bin/Debug/net7.0/GoSpec.dll b/bin/Debug/net7.0/GoSpec.dll index a2575e7..5797426 100644 Binary files a/bin/Debug/net7.0/GoSpec.dll and b/bin/Debug/net7.0/GoSpec.dll differ diff --git a/bin/Debug/net7.0/GoSpec.pdb b/bin/Debug/net7.0/GoSpec.pdb index bb45b86..a18bc91 100644 Binary files a/bin/Debug/net7.0/GoSpec.pdb and b/bin/Debug/net7.0/GoSpec.pdb differ diff --git a/bin/Debug/net7.0/gospec-v1.2.zip b/bin/Debug/net7.0/gospec-v1.1.zip similarity index 84% rename from bin/Debug/net7.0/gospec-v1.2.zip rename to bin/Debug/net7.0/gospec-v1.1.zip index c5a3913..8eba930 100644 Binary files a/bin/Debug/net7.0/gospec-v1.2.zip and b/bin/Debug/net7.0/gospec-v1.1.zip differ diff --git a/obj/Debug/net7.0/GoSpec.dll b/obj/Debug/net7.0/GoSpec.dll index a2575e7..5797426 100644 Binary files a/obj/Debug/net7.0/GoSpec.dll and b/obj/Debug/net7.0/GoSpec.dll differ diff --git a/obj/Debug/net7.0/GoSpec.pdb b/obj/Debug/net7.0/GoSpec.pdb index bb45b86..a18bc91 100644 Binary files a/obj/Debug/net7.0/GoSpec.pdb and b/obj/Debug/net7.0/GoSpec.pdb differ diff --git a/obj/Debug/net7.0/ref/GoSpec.dll b/obj/Debug/net7.0/ref/GoSpec.dll index 704a665..7548711 100644 Binary files a/obj/Debug/net7.0/ref/GoSpec.dll and b/obj/Debug/net7.0/ref/GoSpec.dll differ diff --git a/obj/Debug/net7.0/refint/GoSpec.dll b/obj/Debug/net7.0/refint/GoSpec.dll index 704a665..7548711 100644 Binary files a/obj/Debug/net7.0/refint/GoSpec.dll and b/obj/Debug/net7.0/refint/GoSpec.dll differ