"Server Full" Msg

Posts 1–15 of 27 · Page 1 of 2
"Server Full" Msg
Most of you know Nillys Realm and that annoying message saying the server is full whenever you try playing, well if you own a server, here is how you can add a message to tell the user that the server is full when they try connecting to a full server. This only works on sources with maxClients implemented, unless you added another way yourself to an earlier source, but I am using FSoD atm, but it's simple.
HelloHandler.cs in wServer.networking.handlers
Code:
                if (Manager.Clients.Count >= Manager.MaxClients)
                {
                    client.SendPacket(new FailurePacket
                    {
                        ErrorId = 0,
                        ErrorDescription = "Server full!"
                    });
                    client.Disconnect();
                    return;
                }


There is a simpler way to do this but good job anyways

also Hello is one of the classes that I edited to add the client validator anti-hack

also ^ thats a hint to anyone trying to build an anti-hack
Quote Originally Posted by DimitriSavage View Post
There is a simpler way to do this but good job anyways
i tried shortening it by doing a simple SendError(); but it gave wServer errors
only even thought of this cuz im messing with nillys realms client rn and i like stealing ideas off of his server lol only things I so far even copied from his server is his /gift command and the /vault /realm /nexus and other map commands and soon i want to attempt the override command but that looks like hella work.
not even using fabs atm so thatll have to wait, im going old school and been using phoenix 1.9.2 recently.
Quote Originally Posted by Riigged View Post
i tried shortening it by doing a simple SendError(); but it gave wServer errors
only even thought of this cuz im messing with nillys realms client rn and i like stealing ideas off of his server lol only things I so far even copied from his server is his /gift command and the /vault /realm /nexus and other map commands and soon i want to attempt the override command but that looks like hella work.
not even using fabs atm so thatll have to wait, im going old school and been using phoenix 1.9.2 recently.
ahh you mean player.SendError(); it would work...only if the player was connected in the first place lololol

and override command?...expand...
Quote Originally Posted by DimitriSavage View Post
and override command?...expand...
controlling someone elses client
Quote Originally Posted by Masternx View Post
Only thing I can think of is making the Max Client unlimited if rank = we. Other then that, I don't really know, It's probably very simple, just look at the source and play around with some stuff, you will most likely work out :3 Good luck!
sounds fun I want to try :3

- - - Updated - - -

Quote Originally Posted by Riigged View Post
controlling someone elses client
To make then copy another players movement or switch screens as if you were playing as another player?
Quote Originally Posted by DimitriSavage View Post
sounds fun I want to try :3

- - - Updated - - -



To make then copy another players movement or switch screens as if you were playing as another player?
idk, never seen it in action cuz im not ranked on NR therefore dont have permission for command xD, I think it switches their screen to overlap on your screen as if you were playing on their client because ive seen another person use it and they were able to drop items and talk and stuff.
Any way to add an exception if the rank is higher?
Quote Originally Posted by Luis View Post
Any way to add an exception if the rank is higher?
Only thing I can think of is making the Max Client unlimited if rank = we. Other then that, I don't really know, It's probably very simple, just look at the source and play around with some stuff, you will most likely work out :3 Good luck!
Done I added the ranks

give me a sec to post it

- - - Updated - - -

Code:
                if (Manager.Clients.Count >= Manager.MaxClients)
                {
                    if (client.Account.Rank < 3)
                    {
                        client.SendPacket(new FailurePacket
                        {
                            ErrorId = 0,
                            ErrorDescription = "Server Full"
                        });
                        client.Disconnect();
                        return;
                    }
                }
@Luis
thanks ? lololololo

- - - Updated - - -

I am also going to start working on that override command of yours
Quote Originally Posted by DimitriSavage View Post
Done I added the ranks

give me a sec to post it

- - - Updated - - -

Code:
                if (Manager.Clients.Count >= Manager.MaxClients)
                {
                    if (client.Account.Rank < 3)
                    {
                        client.SendPacket(new FailurePacket
                        {
                            ErrorId = 0,
                            ErrorDescription = "Server Full"
                        });
                        client.Disconnect();
                        return;
                    }
                }
@Luis
thanks ? lololololo

- - - Updated - - -

I am also going to start working on that override command of yours
that will only display the message if they are lower than rank 3 lol, they will still get connection failed tho since there the maxclients are still reached, i think he wants it so if you are X rank, you bypass the maxclients limit like on nillys realm if you are a donor you can get into server even if full
Quote Originally Posted by DimitriSavage View Post
Done I added the ranks

give me a sec to post it

- - - Updated - - -

Code:
                if (Manager.Clients.Count >= Manager.MaxClients)
                {
                    if (client.Account.Rank < 3)
                    {
                        client.SendPacket(new FailurePacket
                        {
                            ErrorId = 0,
                            ErrorDescription = "Server Full"
                        });
                        client.Disconnect();
                        return;
                    }
                }
@Luis
thanks ? lololololo

- - - Updated - - -

I am also going to start working on that override command of yours
Will test, if this works your a bae.
Also added ban to it since I remember people saying it was broken

Code:
if (client.Account.Banned)
                {
                        client.SendPacket(new FailurePacket
                        {
                            ErrorId = 0,
                            ErrorDescription = "Account Under Maintenance"
                        });
                        client.Disconnect();
                        return;
                }
someone test this banned thing here too if this doesn't work then i know how to modify the /ban command to make it work
- - - Updated - - -

Quote Originally Posted by Riigged View Post
that will only display the message if they are lower than rank 3 lol, they will still get connection failed tho since there the maxclients are still reached, i think he wants it so if you are X rank, you bypass the maxclients limit like on nillys realm if you are a donor you can get into server even if full
wrong its an exception....if the account is rank 3 then it bypasses....its just like my Admin Teleport Bypass

if account rank lower then 3 then it kicks...if not then it doesn't run the disconnect
Quote Originally Posted by DimitriSavage View Post
Also added ban to it since I remember people saying it was broken

Code:
if (client.Account.Banned)
                {
                        client.SendPacket(new FailurePacket
                        {
                            ErrorId = 0,
                            ErrorDescription = "Account Under Maintenance"
                        });
                        client.Disconnect();
                        return;
                }
someone test this banned thing here too if this doesn't work then i know how to modify the /ban command to make it work
- - - Updated - - -



wrong its an exception....if the account is rank 3 then it bypasses....its just like my Admin Teleport Bypass

if account rank lower then 3 then it kicks...if not then it doesn't run the disconnect
I'm not 100% sure, but I'm quite positive if Max Client is well, maxed. The client can't actually connect, so I don't think it bypasses. :/
Posts 1–15 of 27 · Page 1 of 2

Post a Reply

Similar Threads

Talk with us