![]() |
Having Option to Select Mutliple Servers - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Having Option to Select Mutliple Servers (/showthread.php?tid=483) |
Having Option to Select Mutliple Servers - halla - 16-12-2006 Difficulty 1/5 ![]() This is pretty simple and works best with mysql since you can have multiple servers share a database but it can also be used with the other versions. You can have multiple servers if one cant support your player base but with other versions each must have their own databases. Anyways its pretty simple but might as well post it here if anyone wants to use it. Everything done here is CLIENT SIDE Go to modClientTCP. Find Code: Public InGame As Boolean Under it add Code: Public GAME_IP As String Find Code: ServerIP = Decrypt(DBKEY, "C489347322B38A4C1924B3A662A201AE98464DCA3FA926872A8A0C92212D8919") 'localip Change that to Code: ServerIP = GAME_IP Now go to frmLogin Make X Option Buttons (where X is the number of servers you want to have.) Name them something easy such as ... opt1, opt2, opt3 so on. Now make the same amount of labels. Name each whatever the servers are called and place them with the option buttons. [You can do this with buttons or listbox or whatever you like... I chose option buttons.] Now Find Code: Dim Password As String Under it add Code: If opt1.Value = True Then Add more for each server you have... if you have 2 servers you would also add If opt2.Value = True Then GAME_IP = "127.0.0.1" Call TcpInit End If Also remember to change the IPs to the IPs of the servers you want it to connect to. Thats pretty much it. You choose a server and when you connect it connects to that server. You may also want to have one of the option buttons set to True when you make it so that 1 will always be checked at least. Any questions or anything let me know. Re: Having Option to Select Mutliple Servers - AngelicGodz - 03-08-2007 I want to do Muti Server So it can hold more people how can i do that without Sql script Editior? i cant seem any file to edit it Re: Having Option to Select Mutliple Servers - Robin - 03-08-2007 You have to run three separate instances of the server. Re: Having Option to Select Mutliple Servers - AngelicGodz - 04-08-2007 Can anyone give me the Rar and info on how to edit the Server1 server 2 to my Server name i just need the Rar to put in my Server file thank Re: Having Option to Select Mutliple Servers - Robin - 04-08-2007 No you don't. You need to understand that to run multiple servers you're going to have to know the basics of Server - Client communication and a tiny bit of programming knowledge. Also, to share data between them you're probably going to have to use MySQL or some sort of equivalent, or use Daves idea. I would really suggest you stop asking for people to add features for you, and learn the basics of programming first. |