mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Update AdminMenu.cs
Added AltCheckPermissions
This commit is contained in:
parent
2ab2f9c4dc
commit
80af29fb50
1 changed files with 9 additions and 1 deletions
|
|
@ -23,6 +23,14 @@ namespace CS2_SimpleAdmin.Menus
|
|||
}
|
||||
}
|
||||
|
||||
public static bool AltCheckPermissions(bool hasPerm, CCSPlayerController? player, string command)
|
||||
{
|
||||
if ((hasPerm && !AdminManager.PlayerHasCommandOverride(player, command)) ||
|
||||
(AdminManager.PlayerHasCommandOverride(player, command) &&
|
||||
AdminManager.GetPlayerCommandOverrideState(player, command))) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void OpenMenu(CCSPlayerController admin)
|
||||
{
|
||||
if (admin == null || admin.IsValid == false)
|
||||
|
|
@ -57,4 +65,4 @@ namespace CS2_SimpleAdmin.Menus
|
|||
OpenMenu(admin, menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue