Table of Contents

Interface ICommandTextFormatter

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

Formats command usage text. Generates strings like "/cmd <arg1> <arg2>" for display. Can be customized for localization.

public interface ICommandTextFormatter

Methods

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

Formats a command usage text with parameters.

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]".