This commit is contained in:
2025-06-05 01:12:55 +02:00
parent 17c654d889
commit 96596e9c08
39 changed files with 1157 additions and 1350 deletions
+2 -4
View File
@@ -1,5 +1,4 @@
using LabApi.Events.Handlers;
using LabApi.Features;
using LabApi.Features;
using LabApi.Loader.Features.Plugins;
namespace ScpSwap;
@@ -11,13 +10,12 @@ public class ScpSwap : Plugin
public override Version Version { get; } = new(1, 0, 0);
public override string Description => "Swap SCPs.";
public override Version RequiredApiVersion { get; } = new(LabApiProperties.CompiledVersion);
public override void Enable()
{
}
public override void Disable()
{
}
}
+2 -2
View File
@@ -24,7 +24,7 @@
<HintPath>..\dependencies\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="CommandSystem.Core">
<HintPath>..\dependencies\CommandSystem.Core.dll</HintPath>
<HintPath>..\dependencies\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Mirror">
<HintPath>..\dependencies\Mirror.dll</HintPath>
@@ -38,6 +38,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Northwood.LabAPI" Version="1.0.2" />
<PackageReference Include="Northwood.LabAPI" Version="1.0.2"/>
</ItemGroup>
</Project>
+7 -6
View File
@@ -40,18 +40,19 @@ public class SwapCommand : ICommand
"096",
"106",
"173",
"939",
"939"
];
var arg = arguments.First();
if (!validScp.Contains(arg))
{
response = "Invalid SCP number.";
return false;
}
if (Player.List.Where(x=>x.IsSCP).Select(x=>x.RoleBase).Any(playerRole => playerRole.RoleName == "SCP-" + arg))
if (Player.List.Where(x => x.IsSCP).Select(x => x.RoleBase)
.Any(playerRole => playerRole.RoleName == "SCP-" + arg))
{
response = "Already exists";
return false;
@@ -69,7 +70,7 @@ public class SwapCommand : ICommand
};
player.SetRole(role);
response = "Swapping...";
return true;
@@ -77,5 +78,5 @@ public class SwapCommand : ICommand
public string Command { get; } = "scpswap";
public string[] Aliases { get; } = ["ss"];
public string Description { get; } = "Swaps SCPs";
public string Description { get; } = "Swaps SCPs";
}