I'd like to call the ConVar.Admin.mute method from a plugin.
I can't understad what is the process to build a new ConsoleSystem.Arg argument which has the following signature.
Please don't tell me to use BasePlayer.SetPlayerFlag().. ;-P
There are a lot of ConVar commands which require ConsoleSystem.Arg as the argument.
So knowing how to call them correctly might be very interesting.
public static void mute(ConsoleSystem.Arg arg)
{
global::BasePlayer playerOrSleeper = arg.GetPlayerOrSleeper(0);
if (!playerOrSleeper || playerOrSleeper.net == null || playerOrSleeper.net.connection == null)
{
arg.ReplyWith("Player not found");
return;
}
playerOrSleeper.SetPlayerFlag(global::BasePlayer.PlayerFlags.ChatMute, true);
}I can't understad what is the process to build a new ConsoleSystem.Arg argument which has the following signature.
public Arg(ConsoleSystem.Option options, string rconCommand)Please don't tell me to use BasePlayer.SetPlayerFlag().. ;-P
There are a lot of ConVar commands which require ConsoleSystem.Arg as the argument.
So knowing how to call them correctly might be very interesting.