1. Hi,
    Is the Rust have any server command where can I list the sleeper players?
    The 'status' is give me only the online players list, but I want to somehow listing the sleepers too (without teleport to them).
    Is it possible from original command or it's working only with plugin (eg. with Finder maybe?) ?
     
  2. Last edited by a moderator: Apr 8, 2017
  3. Code:
    namespace Oxide.Plugins
    {
        [Info("PlayerCounter", "redBDGR", "1.0.0")]
        [Description("Listing of all online / sleeping players")]
        class PlayerCounter : RustPlugin
        {
            public const string permissionName = "onlineplayers.use";
            void Init() => permission.RegisterPermission(permissionName, this);        [ChatCommand("onlineplayers")]
            void onlineplayersCMD(BasePlayer player, string command, string[] args)
            {
                if (!permission.UserHasPermission(player.UserIDString, permissionName)) return;
                int x = 1;
                foreach (BasePlayer user in BasePlayer.activePlayerList)
                {
                    Puts($"{x.ToString()}. {user.displayName} | {user.UserIDString}");
                    x++;
                }
            }        [ChatCommand("sleepingplayers")]
            void sleepingplayersCMD(BasePlayer player, string command, string[] args)
            {
                if (!permission.UserHasPermission(player.UserIDString, permissionName)) return;
                int x = 1;
                foreach (BasePlayer user in BasePlayer.sleepingPlayerList)
                {
                    Puts($"{x.ToString()}. {user.displayName} | {user.UserIDString}");
                    x++;
                }
            }
        }
    }
    Here's a newer version... doesn't do a lot different but it looks a lot nicer :D
     
  4. Nice... thanks!