AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   I'm looking for a plugin (https://forums.alliedmods.net/showthread.php?t=343252)

q1085909155 07-03-2023 07:01

I'm looking for a plugin
 
Hi, I'm running a trade server, but some new accounts keep coming in and slaughtering all the players, and I'm looking for a plugin that will limit the access of new accounts to the server. Or, if their account is private, they are barred from the server

Austin 07-06-2023 15:33

Re: I'm looking for a plugin
 
1 Attachment(s)
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 clientchar[] rejectmsgint maxlen)
{
    
strcopy(rejectmsg100"This server is limited to Private  players.");
    
    
char steamId[64];
    
GetClientAuthId(clientAuthId_Steam2steamId128);

    
// 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
    
}



q1085909155 07-07-2023 03:23

Re: I'm looking for a plugin
 
Quote:

Originally Posted by Austin (Post 2806872)
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 clientchar[] rejectmsgint maxlen)
{
    
strcopy(rejectmsg100"This server is limited to Private  players.");
    
    
char steamId[64];
    
GetClientAuthId(clientAuthId_Steam2steamId128);

    
// 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.

azalty 07-07-2023 11:43

Re: I'm looking for a plugin
 
2 Attachment(s)
You could use my "No Dupe Account" CS:GO plugin, which could fit your needs.
See https://forums.alliedmods.net/showthread.php?t=330779 - https://github.com/azalty/sm-no-dupe-account/

The plugin has been thought for csgo, but should work by disabling CSGO level, CSGO prime and CSGO coin verification:

nda_level "0"
nda_prime "0"
nda_coin "1"

Then by modifying this line to:
PHP Code:

Format(g_sRequestURLBuffersizeof(g_sRequestURLBuffer), "http://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=%s&include_played_free_games=1&appids_filter[0]=440&steamid=%s"g_sSteamAPIKeysteamid); 

(changing 730 to 440 - the AppID of TF2) - it should work with TF2.
Once that is done, recompile the plugin.
I did this modification (and made the AppID a constant), and attached the compiled plugin to this post.

There are also a whitelist/blacklist system, country filtering system, VAC/Game ban verification methods, VPN/Proxy checking, Steam level and age verif

I have no guarantees that it will work, but you might want to give it a try ;)

---

Else, you should be looking at playtime restriction plugins OR steam age restriction plugins

q1085909155 07-07-2023 11:45

Re: I'm looking for a plugin
 
Quote:

Originally Posted by azalty (Post 2806892)
You could use my "No Dupe Account" CS:GO plugin, which could fit your needs.
See https://forums.alliedmods.net/showthread.php?t=330779 - https://github.com/azalty/sm-no-dupe-account/

The plugin has been thought for csgo, but should work by disabling CSGO level, CSGO prime and CSGO coin verification:

nda_level "0"
nda_prime "0"
nda_coin "1"

Then by modifying this line to:
PHP Code:

Format(g_sRequestURLBuffersizeof(g_sRequestURLBuffer), "http://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=%s&include_played_free_games=1&appids_filter[0]=440&steamid=%s"g_sSteamAPIKeysteamid); 

(changing 730 to 440 - the AppID of TF2) - it should work with TF2.
Once that is done, recompile the plugin.
I did this modification (and made the AppID a constant), and attached the compiled plugin to this post.

There are also a whitelist/blacklist system, country filtering system, VAC/Game ban verification methods, VPN/Proxy checking, Steam level and age verif

I have no guarantees that it will work, but you might want to give it a try ;)

---

Else, you should be looking at playtime restriction plugins OR steam age restriction plugins

This is great! Thank you for your support!


All times are GMT -4. The time now is 08:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.