1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-14 09:08:32 -05:00

update parser selection menu text during setup

update IW4 script commands gsc and plugin to give base example
fix issue with new account alias linking (I think)
This commit is contained in:
RaidMax
2020-01-21 18:08:18 -06:00
parent 5fc68abce9
commit c17ee0a352
23 changed files with 182 additions and 433 deletions

View File

@ -0,0 +1,34 @@
using SharedLibraryCore;
using SharedLibraryCore.Database.Models;
using System.Threading.Tasks;
namespace IW4ScriptCommands.Commands
{
/// <summary>
/// Example script command
/// </summary>
public class KillPlayerCommand : Command
{
public KillPlayerCommand() : base("killplayer", "kill a player", "kp", EFClient.Permission.Administrator, true, new[]
{
new CommandArgument()
{
Name = "player",
Required = true
}
})
{ }
public override async Task ExecuteAsync(GameEvent E)
{
var cmd = new ScriptCommand()
{
CommandName = "killplayer",
ClientNumber = E.Target.ClientNumber,
CommandArguments = new[] { E.Origin.ClientNumber.ToString() }
};
await cmd.Execute(E.Owner);
}
}
}