Table of Contents

Class CommandInfo

Namespace
CounterStrikeSharp.API.Modules.Commands
Assembly
CounterStrikeSharp.API.dll
public class CommandInfo
Inheritance
CommandInfo
Extension Methods

Properties

ArgCount

public int ArgCount { get; }

Property Value

int

ArgString

public string ArgString { get; }

Property Value

string

CallingContext

Whether or not the command was sent via Console or Chat.

public CommandCallingContext CallingContext { get; }

Property Value

CommandCallingContext

CallingPlayer

public CCSPlayerController? CallingPlayer { get; }

Property Value

CCSPlayerController

GetCommandString

public string GetCommandString { get; }

Property Value

string

Handle

public nint Handle { get; }

Property Value

nint

Methods

ArgByIndex(int)

public string ArgByIndex(int index)

Parameters

index int

Returns

string

GetArg(int)

public string GetArg(int index)

Parameters

index int

Returns

string

ReplyToCommand(string)

Replies to the command with a message. If the command was sent via Chat, PrintToChat(string) is used, otherwise PrintToConsole(string) is used. If sent from the server console/RCON, PrintToConsole(string) is used.

public void ReplyToCommand(string message)

Parameters

message string

Message to send

ReplyToCommand(string, bool)

[Obsolete("Console parameter is now automatically set based on the context of the command.", true)]
public void ReplyToCommand(string message, bool console = false)

Parameters

message string
console bool