moved heartbeat to timer instead of manual task/thread
GameEventHandler uses ConcurrentQueue for events exception handlers for events and log reading added IW4ScriptCommands plugin fixed stats lots of little fixes
This commit is contained in:
19
Plugins/IW4ScriptCommands/Commands/Balance.cs
Normal file
19
Plugins/IW4ScriptCommands/Commands/Balance.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Objects;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IW4ScriptCommands.Commands
|
||||
{
|
||||
class Balance : Command
|
||||
{
|
||||
public Balance() : base("balance", "balance teams", "bal", Player.Permission.Trusted, false, null)
|
||||
{
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
await E.Owner.ExecuteCommandAsync("sv_iw4madmin_command balance");
|
||||
await E.Origin.Tell("Balance command sent");
|
||||
}
|
||||
}
|
||||
}
|
22
Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj
Normal file
22
Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj
Normal file
@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy "$(TargetPath)" "$(SolutionDir)BUILD\Plugins"" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SharedLibraryCore\SharedLibraryCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.NETCore.App" Version="2.0.7" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
26
Plugins/IW4ScriptCommands/Plugin.cs
Normal file
26
Plugins/IW4ScriptCommands/Plugin.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IW4ScriptCommands
|
||||
{
|
||||
class Plugin : IPlugin
|
||||
{
|
||||
public string Name => "IW4 Script Commands";
|
||||
|
||||
public float Version => 1.0f;
|
||||
|
||||
public string Author => "RaidMax";
|
||||
|
||||
public Task OnEventAsync(GameEvent E, Server S) => Task.CompletedTask;
|
||||
|
||||
public Task OnLoadAsync(IManager manager) => Task.CompletedTask;
|
||||
|
||||
public Task OnTickAsync(Server S) => Task.CompletedTask;
|
||||
|
||||
public Task OnUnloadAsync() => Task.CompletedTask;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user