mirror of
https://github.com/joahreason/GoSpec.git
synced 2026-09-27 21:17:05 +02:00
Compare commits
No commits in common. "main" and "release-v1.0" have entirely different histories.
main
...
release-v1
55 changed files with 419 additions and 167 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,4 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]
|
||||
23
Debug/net7.0/GoSpec.AssemblyInfo.cs
Normal file
23
Debug/net7.0/GoSpec.AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("GoSpec")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("GoSpec")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("GoSpec")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
1
Debug/net7.0/GoSpec.AssemblyInfoInputs.cache
Normal file
1
Debug/net7.0/GoSpec.AssemblyInfoInputs.cache
Normal file
|
|
@ -0,0 +1 @@
|
|||
471577c85c20e935d058852ce27820d09f406ff6
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
is_global = true
|
||||
build_property.TargetFramework = net7.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = GoSpec
|
||||
build_property.ProjectDir = C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\
|
||||
8
Debug/net7.0/GoSpec.GlobalUsings.g.cs
Normal file
8
Debug/net7.0/GoSpec.GlobalUsings.g.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
BIN
Debug/net7.0/GoSpec.assets.cache
Normal file
BIN
Debug/net7.0/GoSpec.assets.cache
Normal file
Binary file not shown.
BIN
Debug/net7.0/GoSpec.csproj.AssemblyReference.cache
Normal file
BIN
Debug/net7.0/GoSpec.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
0
Debug/net7.0/GoSpec.csproj.CopyComplete
Normal file
0
Debug/net7.0/GoSpec.csproj.CopyComplete
Normal file
1
Debug/net7.0/GoSpec.csproj.CoreCompileInputs.cache
Normal file
1
Debug/net7.0/GoSpec.csproj.CoreCompileInputs.cache
Normal file
|
|
@ -0,0 +1 @@
|
|||
4ae2f8cc914e5731f0dd5f350597a99e76bffa32
|
||||
38
Debug/net7.0/GoSpec.csproj.FileListAbsolute.txt
Normal file
38
Debug/net7.0/GoSpec.csproj.FileListAbsolute.txt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\GoSpec.deps.json
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\GoSpec.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\McMaster.NETCore.Plugins.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\Microsoft.Extensions.DependencyModel.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\Microsoft.DotNet.PlatformAbstractions.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.xml
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.csproj.AssemblyReference.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.AssemblyInfoInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.AssemblyInfo.cs
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.csproj.CoreCompileInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.csproj.CopyComplete
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\refint\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpec.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\ref\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\GoSpec.deps.json
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\GoSpec.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\CounterStrikeSharp.API.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\McMaster.NETCore.Plugins.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\Microsoft.Extensions.DependencyModel.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\Microsoft.DotNet.PlatformAbstractions.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\CounterStrikeSharp.API.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\bin\Debug\net7.0\CounterStrikeSharp.API.xml
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.csproj.AssemblyReference.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.AssemblyInfoInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.AssemblyInfo.cs
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.csproj.CoreCompileInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.csproj.CopyComplete
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\refint\GoSpec.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\GoSpec.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpec\obj\Debug\net7.0\ref\GoSpec.dll
|
||||
BIN
Debug/net7.0/GoSpec.dll
Normal file
BIN
Debug/net7.0/GoSpec.dll
Normal file
Binary file not shown.
Binary file not shown.
23
Debug/net7.0/GoSpecPlugin.AssemblyInfo.cs
Normal file
23
Debug/net7.0/GoSpecPlugin.AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("GoSpecPlugin")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("GoSpecPlugin")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("GoSpecPlugin")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
1
Debug/net7.0/GoSpecPlugin.AssemblyInfoInputs.cache
Normal file
1
Debug/net7.0/GoSpecPlugin.AssemblyInfoInputs.cache
Normal file
|
|
@ -0,0 +1 @@
|
|||
af664c516f23c90175b90d840ca093ce18198b71
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
is_global = true
|
||||
build_property.TargetFramework = net7.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = GoSpecPlugin
|
||||
build_property.ProjectDir = C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\
|
||||
8
Debug/net7.0/GoSpecPlugin.GlobalUsings.g.cs
Normal file
8
Debug/net7.0/GoSpecPlugin.GlobalUsings.g.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
BIN
Debug/net7.0/GoSpecPlugin.assets.cache
Normal file
BIN
Debug/net7.0/GoSpecPlugin.assets.cache
Normal file
Binary file not shown.
BIN
Debug/net7.0/GoSpecPlugin.csproj.AssemblyReference.cache
Normal file
BIN
Debug/net7.0/GoSpecPlugin.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
0
Debug/net7.0/GoSpecPlugin.csproj.CopyComplete
Normal file
0
Debug/net7.0/GoSpecPlugin.csproj.CopyComplete
Normal file
1
Debug/net7.0/GoSpecPlugin.csproj.CoreCompileInputs.cache
Normal file
1
Debug/net7.0/GoSpecPlugin.csproj.CoreCompileInputs.cache
Normal file
|
|
@ -0,0 +1 @@
|
|||
b5fd285ea9e743660e4fdc32f191640d18da4ad5
|
||||
38
Debug/net7.0/GoSpecPlugin.csproj.FileListAbsolute.txt
Normal file
38
Debug/net7.0/GoSpecPlugin.csproj.FileListAbsolute.txt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\GoSpecPlugin.deps.json
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\GoSpecPlugin.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\McMaster.NETCore.Plugins.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\Microsoft.Extensions.DependencyModel.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\Microsoft.DotNet.PlatformAbstractions.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.xml
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.csproj.AssemblyReference.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.AssemblyInfoInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.AssemblyInfo.cs
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.csproj.CoreCompileInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.csproj.CopyComplete
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\refint\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\GoSpecPlugin.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\HelloWorldPlugin\obj\Debug\net7.0\ref\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\GoSpecPlugin.deps.json
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\GoSpecPlugin.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\McMaster.NETCore.Plugins.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\Microsoft.Extensions.DependencyModel.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\Microsoft.DotNet.PlatformAbstractions.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\bin\Debug\net7.0\CounterStrikeSharp.API.xml
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.csproj.AssemblyReference.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.AssemblyInfoInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.AssemblyInfo.cs
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.csproj.CoreCompileInputs.cache
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.csproj.CopyComplete
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\refint\GoSpecPlugin.dll
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\GoSpecPlugin.pdb
|
||||
C:\Users\joahr\OneDrive\Documents\Dev\addons\GoSpecPlugin\obj\Debug\net7.0\ref\GoSpecPlugin.dll
|
||||
BIN
Debug/net7.0/GoSpecPlugin.dll
Normal file
BIN
Debug/net7.0/GoSpecPlugin.dll
Normal file
Binary file not shown.
BIN
Debug/net7.0/GoSpecPlugin.pdb
Normal file
BIN
Debug/net7.0/GoSpecPlugin.pdb
Normal file
Binary file not shown.
BIN
Debug/net7.0/ref/GoSpec.dll
Normal file
BIN
Debug/net7.0/ref/GoSpec.dll
Normal file
Binary file not shown.
BIN
Debug/net7.0/ref/GoSpecPlugin.dll
Normal file
BIN
Debug/net7.0/ref/GoSpecPlugin.dll
Normal file
Binary file not shown.
BIN
Debug/net7.0/refint/GoSpec.dll
Normal file
BIN
Debug/net7.0/refint/GoSpec.dll
Normal file
Binary file not shown.
BIN
Debug/net7.0/refint/GoSpecPlugin.dll
Normal file
BIN
Debug/net7.0/refint/GoSpecPlugin.dll
Normal file
Binary file not shown.
94
GoSpec.cs
94
GoSpec.cs
|
|
@ -2,107 +2,37 @@
|
|||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Core.Attributes.Registration;
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
using CounterStrikeSharp.API.Modules.Cvars;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
|
||||
namespace GoSpec;
|
||||
|
||||
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.0";
|
||||
|
||||
public override void Load(bool hotReload)
|
||||
{
|
||||
Console.WriteLine($"{ModuleName} version {ModuleVersion} by {ModuleAuthor} is active.");
|
||||
Console.WriteLine($"{ChatColors.Blue}{ModuleName} v{ModuleVersion} by {ModuleAuthor} is active. Type !spec to switch to spec.");
|
||||
}
|
||||
|
||||
[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)
|
||||
{
|
||||
ChangeTeam(caller, CsTeam.Spectator);
|
||||
}
|
||||
if (caller == null) return;
|
||||
if (caller.PlayerPawn.Value.TeamNum == (int)CsTeam.Spectator) return;
|
||||
|
||||
#region Alternate Spec Commands
|
||||
[ConsoleCommand("s", "Moves you to spec.")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||
public void OnSCommand(CCSPlayerController? caller, CommandInfo command) => OnSpecCommand(caller, command);
|
||||
caller.ChangeTeam(CsTeam.Spectator);
|
||||
|
||||
[ConsoleCommand("afk", "Moves you to spec.")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||
public void OnAFKCommand(CCSPlayerController? caller, CommandInfo command) => OnSpecCommand(caller, command);
|
||||
|
||||
[ConsoleCommand("brb", "Moves you to spec.")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||
public void OnBRBCommand(CCSPlayerController? caller, CommandInfo command) => OnSpecCommand(caller, command);
|
||||
#endregion
|
||||
|
||||
[ConsoleCommand("css_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.")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||
public void OnJoinTCommand(CCSPlayerController? caller, CommandInfo command)
|
||||
{
|
||||
ChangeTeam(caller, CsTeam.Terrorist);
|
||||
}
|
||||
|
||||
private bool ChangeTeam(CCSPlayerController? caller, CsTeam moveTo)
|
||||
{
|
||||
if (caller == null) return false;
|
||||
|
||||
if(IsInSpec(caller) && moveTo == CsTeam.Spectator)
|
||||
if (caller.PlayerPawn.Value.TeamNum != (int)CsTeam.Spectator)
|
||||
{
|
||||
caller.PrintToChat($"{ChatColors.Red}You already are in spec.");
|
||||
return false;
|
||||
caller.PrintToChat($"{ChatColors.Red}Failed to move you to spec.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsUnassigned(caller) && moveTo != CsTeam.Spectator)
|
||||
{
|
||||
caller.PrintToChat($"{ChatColors.Red}You must be in spec to use this command.");
|
||||
return false;
|
||||
}
|
||||
|
||||
NotifyTeamChange(caller, moveTo);
|
||||
caller.ChangeTeam(moveTo);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void NotifyTeamChange(CCSPlayerController caller, CsTeam team)
|
||||
{
|
||||
string name = caller.PlayerName ?? "Unknown";
|
||||
char teamColor = ChatColors.White;
|
||||
if (team != CsTeam.Spectator) teamColor = team == CsTeam.Terrorist ? ChatColors.Red : ChatColors.Blue;
|
||||
string teamMsg = $"{ChatColors.Default}Moving {ChatColors.Green}{name} {ChatColors.Default}to {teamColor}{team}.";
|
||||
|
||||
Server.PrintToChatAll(teamMsg);
|
||||
}
|
||||
|
||||
private int GetTeamCount(CsTeam team)
|
||||
{
|
||||
int count = 0;
|
||||
foreach (CCSPlayerController user in Utilities.GetPlayers())
|
||||
{
|
||||
if (user.PlayerPawn.Value.TeamNum == (int)team) count++;
|
||||
}
|
||||
|
||||
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;
|
||||
return caller.TeamNum == (int)CsTeam.Spectator;
|
||||
Server.PrintToChatAll($"{ChatColors.Default}Moving {ChatColors.Green}{caller.PlayerName} {ChatColors.Default}to spec.");
|
||||
}
|
||||
}
|
||||
63
GoSpec.csproj.nuget.dgspec.json
Normal file
63
GoSpec.csproj.nuget.dgspec.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj",
|
||||
"projectName": "GoSpec",
|
||||
"projectPath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj",
|
||||
"packagesPath": "C:\\Users\\joahr\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\joahr\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net7.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net7.0": {
|
||||
"targetAlias": "net7.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net7.0": {
|
||||
"targetAlias": "net7.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
GoSpec.csproj.nuget.g.props
Normal file
15
GoSpec.csproj.nuget.g.props
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\joahr\.nuget\packages\</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.6.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\joahr\.nuget\packages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
2
GoSpec.csproj.nuget.g.targets
Normal file
2
GoSpec.csproj.nuget.g.targets
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
63
GoSpecPlugin.csproj.nuget.dgspec.json
Normal file
63
GoSpecPlugin.csproj.nuget.dgspec.json
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpecPlugin\\GoSpecPlugin.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpecPlugin\\GoSpecPlugin.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpecPlugin\\GoSpecPlugin.csproj",
|
||||
"projectName": "GoSpecPlugin",
|
||||
"projectPath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpecPlugin\\GoSpecPlugin.csproj",
|
||||
"packagesPath": "C:\\Users\\joahr\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpecPlugin\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\joahr\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net7.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net7.0": {
|
||||
"targetAlias": "net7.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net7.0": {
|
||||
"targetAlias": "net7.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
GoSpecPlugin.csproj.nuget.g.props
Normal file
15
GoSpecPlugin.csproj.nuget.g.props
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\joahr\.nuget\packages\</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.6.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\joahr\.nuget\packages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
2
GoSpecPlugin.csproj.nuget.g.targets
Normal file
2
GoSpecPlugin.csproj.nuget.g.targets
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
10
README.md
10
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:** `ccs_spec` in console or `!spec` in chat
|
||||
|
|
|
|||
|
|
@ -1,78 +0,0 @@
|
|||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v7.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v7.0": {
|
||||
"GoSpec/1.0.0": {
|
||||
"dependencies": {
|
||||
"CounterStrikeSharp.API": "1.0.52.0"
|
||||
},
|
||||
"runtime": {
|
||||
"GoSpec.dll": {}
|
||||
}
|
||||
},
|
||||
"CounterStrikeSharp.API/1.0.52.0": {
|
||||
"runtime": {
|
||||
"CounterStrikeSharp.API.dll": {
|
||||
"assemblyVersion": "1.0.52.0",
|
||||
"fileVersion": "1.0.52.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"McMaster.NETCore.Plugins/1.4.0.0": {
|
||||
"runtime": {
|
||||
"McMaster.NETCore.Plugins.dll": {
|
||||
"assemblyVersion": "1.4.0.0",
|
||||
"fileVersion": "1.4.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.DependencyModel/5.0.0.0": {
|
||||
"runtime": {
|
||||
"Microsoft.Extensions.DependencyModel.dll": {
|
||||
"assemblyVersion": "5.0.0.0",
|
||||
"fileVersion": "5.0.20.51904"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.DotNet.PlatformAbstractions/3.1.6.0": {
|
||||
"runtime": {
|
||||
"Microsoft.DotNet.PlatformAbstractions.dll": {
|
||||
"assemblyVersion": "3.1.6.0",
|
||||
"fileVersion": "3.100.620.31604"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"GoSpec/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"CounterStrikeSharp.API/1.0.52.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"McMaster.NETCore.Plugins/1.4.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.Extensions.DependencyModel/5.0.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.DotNet.PlatformAbstractions/3.1.6.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
68
project.assets.json
Normal file
68
project.assets.json
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net7.0": {}
|
||||
},
|
||||
"libraries": {},
|
||||
"projectFileDependencyGroups": {
|
||||
"net7.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\joahr\\.nuget\\packages\\": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj",
|
||||
"projectName": "GoSpec",
|
||||
"projectPath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj",
|
||||
"packagesPath": "C:\\Users\\joahr\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\joahr\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net7.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net7.0": {
|
||||
"targetAlias": "net7.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net7.0": {
|
||||
"targetAlias": "net7.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
project.nuget.cache
Normal file
8
project.nuget.cache
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "7nQCsG03c3XGEk2dhz7jZAmh7EwSY3QPsz023WQ6+LZHQzh2/ZUhxLXtRerZYAb/f6c80dDqyFrZSKC9YCLJrw==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\joahr\\OneDrive\\Documents\\Dev\\addons\\GoSpec\\GoSpec.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue