Quote:
Originally Posted by Austin
I don't know what a "trade server" is and you didn't mention the game you need this for,
but writing a plugin to handle making your server private and only for certain players is very simple.
I don't know what features SM has built in for this but it probably has this feature built in.
Here is an example plugin that would only allow my two players onto my server.
PHP Code:
#include <sourcemod>
public void OnPluginStart() {
}
public bool OnClientConnect(int client, char[] rejectmsg, int maxlen) { strcopy(rejectmsg, 100, "This server is limited to Private players."); char steamId[64]; GetClientAuthId(client, AuthId_Steam2, steamId, 128);
// only the clients with these ids will be allowed on the server if (strcmp(steamId, "STEAM_1:0:xxxx") == 0 || // Austin - Server Owner strcmp(steamId, "STEAM_1:0:xxxx") == 0) // austinbots2 { return true; } else { return false; //client not found will be rejected and see the reject message } }
|
oh, thanks for your answer, I'm running the TF2 server, which is a trading server where players trade, or go to do something, stay there, and get boxes.
My main point is not to make the server private. What I mean by this is that if a player's Steam profile is set to be private, then denying him access to the server is generally blocking new Steam accounts.