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)
|
public static void OpenMenu(CCSPlayerController admin)
|
||||||
{
|
{
|
||||||
if (admin == null || admin.IsValid == false)
|
if (admin == null || admin.IsValid == false)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue