FiveLife.AlternateLife.RageMP.Net.Commands 0.1.1.459

An alternative command implementation for the "AlternateLife.RageMP.Net" library. This library automates type parsing for you and allows you to have various parameters for your commands.
With the command system used by "AlternateLife.RageMP.Net" you have to use following parameters for your commands: "(IPlayer player, string[] arguments)".
You can even add custom TypeParsers, which allows you do add handy shortcuts like "@" to select the nearest player or "#" to select yourself.

Install-Package FiveLife.AlternateLife.RageMP.Net.Commands -Version 0.1.1.459
dotnet add package FiveLife.AlternateLife.RageMP.Net.Commands --version 0.1.1.459
<PackageReference Include="FiveLife.AlternateLife.RageMP.Net.Commands" Version="0.1.1.459" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FiveLife.AlternateLife.RageMP.Net.Commands --version 0.1.1.459
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

FiveLife.AlternateLife.RageMP.Net.Commands

An alternative command implementation for the AlternateLife.RageMP.Net library. This library automates type parsing for you and allows you to have various parameters for your commands.
With the command system used by AlternateLife.RageMP.Net you have to use following parameters for your commands: (IPlayer player, string[] arguments).
You can even add custom TypeParsers, which allows you do add handy shortcuts like @ to select the nearest player or # to select yourself.

Download & Installation

NuGet

PM> Install-Package FiveLife.AlternateLife.RageMP.Net.Commands

Documentation

No documentation available yet. Take a look at the example code.

Example

public class Main : IResource
{
    public CommandExtension Commands { get; }

    public Main()
    {
        Commands = this.UseFiveLifeCommands(); // This scans your assembly for classes inheriting CommandModule
    }

    public Task OnStartAsync()
    {
        return Task.CompletedTask;
    }

    public Task OnStopAsync()
    {
        return Task.CompletedTask;
    }
}

public class Commands : CommandModule
{
    [Command("veh")]
    [Alias("vehicle", "spawnveh", "car", "v")]
    public async Task SpawnVehicleCommand(IPlayer player, VehicleHash hash = VehicleHash.Adder, uint primaryColor = 112, uint secondaryColor = 112)
    {
        var vehicle = await MP.Vehicles.NewAsync(hash, player.Position, player.Rotation.Z);
        vehicle.SetColor(primaryColor, secondaryColor);
        player.PutIntoVehicle(vehicle, -1);
    }
}

FiveLife.AlternateLife.RageMP.Net.Commands

An alternative command implementation for the AlternateLife.RageMP.Net library. This library automates type parsing for you and allows you to have various parameters for your commands.
With the command system used by AlternateLife.RageMP.Net you have to use following parameters for your commands: (IPlayer player, string[] arguments).
You can even add custom TypeParsers, which allows you do add handy shortcuts like @ to select the nearest player or # to select yourself.

Download & Installation

NuGet

PM> Install-Package FiveLife.AlternateLife.RageMP.Net.Commands

Documentation

No documentation available yet. Take a look at the example code.

Example

public class Main : IResource
{
    public CommandExtension Commands { get; }

    public Main()
    {
        Commands = this.UseFiveLifeCommands(); // This scans your assembly for classes inheriting CommandModule
    }

    public Task OnStartAsync()
    {
        return Task.CompletedTask;
    }

    public Task OnStopAsync()
    {
        return Task.CompletedTask;
    }
}

public class Commands : CommandModule
{
    [Command("veh")]
    [Alias("vehicle", "spawnveh", "car", "v")]
    public async Task SpawnVehicleCommand(IPlayer player, VehicleHash hash = VehicleHash.Adder, uint primaryColor = 112, uint secondaryColor = 112)
    {
        var vehicle = await MP.Vehicles.NewAsync(hash, player.Position, player.Rotation.Z);
        vehicle.SetColor(primaryColor, secondaryColor);
        player.PutIntoVehicle(vehicle, -1);
    }
}

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.1.459 118 3/17/2019
0.1.1.420 78 3/17/2019
0.1.1.395 87 3/17/2019
0.1.1.366 78 3/17/2019
0.1.0.352 82 3/17/2019
0.1.0.336 76 3/17/2019