Hi,
I use PlayerList plugin, it show in chat a list of players with separate or not admin from the playerlist.
How to add moderatorid (authlevel1) as admin on this plugin ?
I see that:
From:Code:var adminCount = players.Connected.Count(p => p.IsAdmin && !p.HasPermission(permHide));
Anyone has an idea to help me to show moderator with admin ?Code:[Command("players", "who")] void PlayersCommand(IPlayer player, string command, string[] args) { if (!player.HasPermission(permAllow)) { player.Reply(Lang("NotAllowed", player.Id, command)); return; }
Thanks !
Solved Showing admin and moderator count?
Discussion in 'Rust Development' started by Cataclysme, Aug 23, 2017.
-
Hello,
Instead of using IsAdmin, you can you authLevel in your select
Code:var adminCount = BasePlayer.activePlayerList.Count(p => p.Connection.authLevel > 0 && !permission.UserHasPermission(permHide));
-
OMG my bad x) how to know if I can use authlevel instead of IsAdmin for example ?
Thansk for your clearly and quickly reply -
Doesn't work:
Code:error CS1501: No overload for method 'UserHasPermission' takes '1' arguments
-
Code:
var adminCount = BasePlayer.activePlayerList.Count(p => p.net.connection.authLevel > 0 && !permission.UserHasPermission(p.UserIDString, permHide));
-