diff --git a/README.md b/README.md index 6afa00a..7091f14 100644 --- a/README.md +++ b/README.md @@ -49,4 +49,15 @@ private void CreateUi(BasePlayer player builder.AddUi(player); //By default the builder will auto destroy the previous UI if it exists on the client } + + +[ConsoleCommand(nameof(CloseCommand))] +private void CloseCommand(ConsoleSystem.Arg arg) +{ + BasePlayer player = arg.Player(); + if (player) + { + UiBuilder.DestroyUi(player, MainUi); + } +} ``` \ No newline at end of file