From SED prefs / XP ConsoleSERVER -sv -cl -pl Observer -diag
CLIENT -cl -pl ThePlayer -diag
downloadCode:
#include <acknex.h>
#include <default.c>
#define MAX_CONNECTIONS 8
FONT* arial_font = "Arial#20b";
var people_connected = 0;
function server_called()
{
// if new player connected, increment people connected
if ((event_type == EVENT_JOIN) && (people_connected <= MAX_CONNECTIONS))
{
people_connected += 1; // another person connected
wait(-5); // wait for the client to load the lvl
send_var(people_connected); // send number of people connected
}
}
function startup()
{
on_server = server_called; // on server event, call server_called()
}
PANEL* pConnectDisplay =
{
digits(25,25,2,arial_font,1,people_connected);
flags = VISIBLE;
}
function main()
{
fps_max=60;
screen_color.blue=125;
startup();
}