Table of Contents

Class DefaultCommandTextFormatter

Namespace
SampSharp.Entities.SAMP.Commands
Assembly
SampSharp.OpenMp.Entities.Commands.dll

Default implementation of ICommandTextFormatter. Generates standard formatted command usage text.

public class DefaultCommandTextFormatter : ICommandTextFormatter
Inheritance
DefaultCommandTextFormatter
Implements
Inherited Members

Constructors

DefaultCommandTextFormatter()

public DefaultCommandTextFormatter()

Methods

FormatCommandUsage(string, string?, CommandParameterInfo[], bool)

Formats a command usage text with parameters.

public string FormatCommandUsage(string commandName, string? group, CommandParameterInfo[] parameters, bool includeSlash = true)

Parameters

commandName string

The command name (without group prefix).

group string

The command group, if any (e.g., "admin money").

parameters CommandParameterInfo[]

The parsed parameters of the command.

includeSlash bool

Whether to include the leading slash (true for player commands, false for console).

Returns

string

Formatted text like "/cmd <arg1> [arg2]".