I wrote something simple that runs inside a dedicated thread and every 5 seconds updates the player list like that. It grabs the actual name of the server and saves it, then appends (%d/%d) to it so it looks like:
SERVER_NAME (CURRENT_PLAYERS/MAX_PLAYERS)
as shown in the attached screenshot. With my GameSpy plugin you can set it so GameSpy broadcasts a custom game title for your server different from the one you set for WOL, so the player count doesn't show up in the title of your server on GSA.
Here's the code and how to use it if you want to have it as an SSGM plugin:
plugin.cpp includes:
void Plugin_Load() {
CreateThread(NULL, NULL, Set_Player_Count_Game_Title, NULL, NULL, NULL);
}
DWORD WINAPI Set_Player_Count_Game_Title(LPVOID params)
{
const char* ServerName = WideCharToChar(The_Game()->GameTitle.Peek_Buffer());
char tmp[128];
for (;;)
{
memset(tmp, 0x0, 128);
sprintf(tmp, "%s (%d/%d)", ServerName, The_Game()->CurrentPlayers, The_Game()->MaxPlayers);
const wchar_t *Data = CharToWideChar(tmp);
The_Game()->GameTitle = Data;
delete []Data;
Sleep(5000);
}
delete []ServerName;
return 0;
}
And inside plugin.h include:
DWORD WINAPI Set_Player_Count_Game_Title(LPVOID params);
[Updated on: Sun, 14 August 2011 15:16]
Report message to a moderator