Thread: Server menu
View Single Post
Plugin Info:     Modification:          Category:          Approver:   devicenull (200)
Janzert
Senior Member
Join Date: Mar 2004
Old 11-04-2004 , 11:35   Server menu
Reply With Quote #1

This gives an in game menu that will allow players to query and connect to other servers if wanted.

To set the list of servers available, create a file serverlist.cfg in the amxx config directory. Each line should contain one server and look like:

Server name\IP or hostname:port password

Server name is whatever you want the server to be called in the menu. That is followed by a backslash (\). Then the hostname or IP of the server followed by a colon (:) and then the port. If needed the password is put after a space following the port. Warning, this will allow anyone that uses the menu to connect to the passworded server to learn the password.
The port and password are optional. The port will default to 27015 and must be defined if a password is used.

Lines starting with # or ; are considered a comment.

1.0
Some small refactoring to clean up the code a bit.
Fixed a bug where it would not handle a challenge with a 0x00 byte in it.
Unfortunately this uncovered a similiar bug in the sockets module. So...
Added a little more graceful handling of packet errors.

0.6
Update to new steam server query protocol.

0.5
Changed the way packets are formed to be sent. Hopefully working around the linux compiler bug and also being 64bit compliant. (Suggested by Bailopan.)

0.4:
Fixed showing incorrect number of pages on the main server menu.

0.3:
Changed includes to conform with standard practice
Made the port optional in the server list
Added ability to connect to password protected servers

0.2:
Initial public release
Attached Files
File Type: sma Get Plugin or Get Source (servermenu.sma - 8599 views - 18.2 KB)
__________________
Janzert is offline