mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 18:49:23 +00:00
Added ExecuteOnClient option on custom commands
This commit is contained in:
@@ -31,8 +31,14 @@ namespace CS2_SimpleAdmin.Menus
|
||||
bool hasRights = AdminManager.PlayerHasPermissions(admin, customCommand.Flag);
|
||||
if (!hasRights)
|
||||
continue;
|
||||
|
||||
options.Add(new ChatMenuOptionData(customCommand.DisplayName, () => Server.ExecuteCommand(customCommand.Command)));
|
||||
|
||||
options.Add(new ChatMenuOptionData(customCommand.DisplayName, () =>
|
||||
{
|
||||
if (customCommand.ExecuteOnClient)
|
||||
admin.ExecuteClientCommand(customCommand.Command);
|
||||
else
|
||||
Server.ExecuteCommand(customCommand.Command);
|
||||
}));
|
||||
}
|
||||
|
||||
foreach (ChatMenuOptionData menuOptionData in options)
|
||||
|
||||
Reference in New Issue
Block a user