From 90556e66b272ed541da5b01e958ef5b9d936c020 Mon Sep 17 00:00:00 2001 From: Valentin Barat Date: Sun, 14 Apr 2024 19:36:28 +0200 Subject: [PATCH] Fixed client commands in custom commands --- Menus/CustomCommandsMenu.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Menus/CustomCommandsMenu.cs b/Menus/CustomCommandsMenu.cs index dd1d9d1..2e189b4 100644 --- a/Menus/CustomCommandsMenu.cs +++ b/Menus/CustomCommandsMenu.cs @@ -31,13 +31,13 @@ namespace CS2_SimpleAdmin.Menus bool hasRights = AdminManager.PlayerHasPermissions(admin, customCommand.Flag); if (!hasRights) continue; - + options.Add(new ChatMenuOptionData(customCommand.DisplayName, () => { Helper.TryLogCommandOnDiscord(admin, customCommand.Command); - + if (customCommand.ExecuteOnClient) - admin.ExecuteClientCommand(customCommand.Command); + admin.ExecuteClientCommandFromServer(customCommand.Command); else Server.ExecuteCommand(customCommand.Command); }));