mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Fixed client commands in custom commands
This commit is contained in:
parent
39404e52ac
commit
90556e66b2
1 changed files with 3 additions and 3 deletions
|
|
@ -31,13 +31,13 @@ namespace CS2_SimpleAdmin.Menus
|
||||||
bool hasRights = AdminManager.PlayerHasPermissions(admin, customCommand.Flag);
|
bool hasRights = AdminManager.PlayerHasPermissions(admin, customCommand.Flag);
|
||||||
if (!hasRights)
|
if (!hasRights)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
options.Add(new ChatMenuOptionData(customCommand.DisplayName, () =>
|
options.Add(new ChatMenuOptionData(customCommand.DisplayName, () =>
|
||||||
{
|
{
|
||||||
Helper.TryLogCommandOnDiscord(admin, customCommand.Command);
|
Helper.TryLogCommandOnDiscord(admin, customCommand.Command);
|
||||||
|
|
||||||
if (customCommand.ExecuteOnClient)
|
if (customCommand.ExecuteOnClient)
|
||||||
admin.ExecuteClientCommand(customCommand.Command);
|
admin.ExecuteClientCommandFromServer(customCommand.Command);
|
||||||
else
|
else
|
||||||
Server.ExecuteCommand(customCommand.Command);
|
Server.ExecuteCommand(customCommand.Command);
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue