Skip to content

Commit

Permalink
Update ManageServerMenu.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
daffyyyy committed Oct 31, 2024
1 parent c42d2dd commit 7154843
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CS2-SimpleAdmin/Menus/ManageServerMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ public static void OpenMenu(CCSPlayerController admin)

// permissions
var hasMap = AdminManager.CommandIsOverriden("css_map") ? AdminManager.PlayerHasPermissions(admin, AdminManager.GetPermissionOverrides("css_map")) : AdminManager.PlayerHasPermissions(admin, "@css/changemap");
var hasPlugins = AdminManager.CommandIsOverriden("css_pluginsmanager") ? AdminManager.PlayerHasPermissions(admin, AdminManager.GetPermissionOverrides("css_pluginsmanager")) : AdminManager.PlayerHasPermissions(admin, "@css/root");

//bool hasMap = AdminManager.PlayerHasPermissions(admin, "@css/changemap");

// options added in order

if (hasPlugins)
{
options.Add(new ChatMenuOptionData(localizer?["sa_menu_pluginsmanager_title"] ?? "Manage Plugins", () => admin.ExecuteClientCommandFromServer("css_pluginsmanager")));
}

if (hasMap)
{
options.Add(new ChatMenuOptionData(localizer?["sa_changemap"] ?? "Change Map", () => ChangeMapMenu(admin)));
Expand Down

0 comments on commit 7154843

Please sign in to comment.