mirror of
https://github.com/joahreason/GoSpec.git
synced 2026-09-27 13:07:04 +02:00
Commit for release version 1.1
- fixed old files from wrong repo structure set up - added new commands
This commit is contained in:
parent
47fcd30365
commit
dada7e074a
54 changed files with 153 additions and 415 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.
|
|
@ -1,4 +0,0 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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 +0,0 @@
|
|||
471577c85c20e935d058852ce27820d09f406ff6
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
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\
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// <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;
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
4ae2f8cc914e5731f0dd5f350597a99e76bffa32
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
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
|
||||
Binary file not shown.
|
|
@ -1,23 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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 +0,0 @@
|
|||
af664c516f23c90175b90d840ca093ce18198b71
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
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\
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// <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;
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
b5fd285ea9e743660e4fdc32f191640d18da4ad5
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
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
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
86
GoSpec.cs
86
GoSpec.cs
|
|
@ -2,37 +2,101 @@
|
|||
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.0";
|
||||
public override string ModuleVersion => "1.1";
|
||||
|
||||
public override void Load(bool hotReload)
|
||||
{
|
||||
Console.WriteLine($"{ChatColors.Blue}{ModuleName} v{ModuleVersion} by {ModuleAuthor} is active. Type !spec to switch to spec.");
|
||||
Console.WriteLine($"{ModuleName} version {ModuleVersion} by {ModuleAuthor} is active.");
|
||||
}
|
||||
|
||||
[ConsoleCommand("spec", "Moves you to spec.")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||
public void OnSpecCommand(CCSPlayerController? caller, CommandInfo command)
|
||||
{
|
||||
if (caller == null) return;
|
||||
if (caller.PlayerPawn.Value.TeamNum == (int)CsTeam.Spectator) return;
|
||||
ChangeTeam(caller, CsTeam.Spectator);
|
||||
}
|
||||
|
||||
caller.ChangeTeam(CsTeam.Spectator);
|
||||
#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);
|
||||
|
||||
if (caller.PlayerPawn.Value.TeamNum != (int)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("ct", "Joins the counterterrorist team.")]
|
||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||
public void OnJoinCTCommand(CCSPlayerController? caller, CommandInfo command)
|
||||
{
|
||||
ChangeTeam(caller, CsTeam.CounterTerrorist);
|
||||
}
|
||||
|
||||
[ConsoleCommand("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)
|
||||
{
|
||||
caller.PrintToChat($"{ChatColors.Red}Failed to move you to spec.");
|
||||
return;
|
||||
caller.PrintToChat($"{ChatColors.Red}You already are in spec.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsInSpec(caller) && moveTo != CsTeam.Spectator)
|
||||
{
|
||||
caller.PrintToChat($"{ChatColors.Red}You must be in spec to use this command.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Server.PrintToChatAll($"{ChatColors.Default}Moving {ChatColors.Green}{caller.PlayerName} {ChatColors.Default}to spec.");
|
||||
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 IsInSpec(CCSPlayerController? caller)
|
||||
{
|
||||
if (caller == null) return false;
|
||||
return caller.TeamNum == (int)CsTeam.Spectator;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
78
bin/Debug/net7.0/GoSpec.deps.json
Normal file
78
bin/Debug/net7.0/GoSpec.deps.json
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
bin/Debug/net7.0/GoSpec.dll
Normal file
BIN
bin/Debug/net7.0/GoSpec.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/Debug/net7.0/McMaster.NETCore.Plugins.dll
Normal file
BIN
bin/Debug/net7.0/McMaster.NETCore.Plugins.dll
Normal file
Binary file not shown.
BIN
bin/Debug/net7.0/Microsoft.DotNet.PlatformAbstractions.dll
Normal file
BIN
bin/Debug/net7.0/Microsoft.DotNet.PlatformAbstractions.dll
Normal file
Binary file not shown.
BIN
bin/Debug/net7.0/Microsoft.Extensions.DependencyModel.dll
Normal file
BIN
bin/Debug/net7.0/Microsoft.Extensions.DependencyModel.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"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