Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having Option to Select Mutliple Servers
#1
Difficulty 1/5

[Image: ssSS.gif]
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
GAME_IP = "127.0.0.1"
Call TcpInit
End If

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.
Reply
#2
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
Reply
#3
You have to run three separate instances of the server.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#4
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
Reply
#5
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.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)