Simple Server Restart Text Command

Posts 16–18 of 18 · Page 2 of 2
Cant find Player.Chat.cs, respond!
Quote Originally Posted by C453 View Post
Just a quick and simple command, for those of you who host servers with a large amount of people.


Basically what is does is when an Admin types the command "SvrRestart", An announcement text comes up saying


"Server restarting soon. Please be ready to disconnect. Estimated server down time: 30 Seconds - 1 Minute"


Just copy + paste this in to Player.Chat.cs

And, no, this does not restart the server. It's just a quicker way to say "server restarting"

Example:

Code:
else if (cmd.Equals("SvrRestart", StringComparison.OrdinalIgnoreCase) && CmdReqAdmin())
            {

                foreach (var i in RealmManager.Clients.Values)
                {
                    i.SendPacket(new TextPacket()
                    {
                        BubbleTime = 0,
                        Stars = -1,
                        Name = "@Announcement",
                        Text = "Server restarting soon. Please be ready to disconnect.                               Estimated server down time: 30 Seconds - 1 Minute"
                    });
                }
            }
It would be easier I guess if you changed the command to /restart instead of /svrrestart
Quote Originally Posted by Ahl View Post
It would be easier I guess if you changed the command to /restart instead of /svrrestart
Anyone can do that on their own, you don't need to give useless tips
Posts 16–18 of 18 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?