Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Remaining text

Emre Kara edited this page Jun 24, 2021 · 1 revision

How can I achieve remaining texts in commands?

You can use "CustomCommandRemainingText" on the last parameter of a command method for that.
This will allow as many arguments as you want to be saved in one variable.

Example:

[CustomCommand("ban")]
public void Ban(IPlayer admin, IPlayer target, [CustomCommandRemainingText] string reason) 
{

}
/ban PlayerXY You have used cheats.

The reason will be "You have used cheats.".

Clone this wiki locally