S2AProxy
This plugin exposes an API for plugins to exclude players from the server browser player list. This could be used to hide admins in admin stealth plugins.
This plugin only intercepts packets coming from server to the client, not packets going to valve's master server, thus this data will only affect direct A2S queries. You cannot fake your player count in the internet tab in server browser!
Example code
PHP Code:
#include <S2AProxy>
public Action OnClientPlayerList(const char[] playerName)
{
PrintToServer("Username: %s", playerName);
if(StrEqual(playerName, "adminname"))
return Plugin_Handled; // Exclude name from list
return Plugin_Continue;
}
public Action OnServerExcludeCount(int &excludeCount)
{
excludeCount = 1; // Number of players to exclude from the total player count
return Plugin_Changed;
}
Changelog
Update 2/4/2023
Update 10/23/2022
Update 1.0.1- Fixed a plugin breaking bug which wouldn't make the byte cursor skip the skipped player and wreck all the data
Requirements