Raised This Month: $51 Target: $400
 12% 

I'm looking for a plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
q1085909155
Member
Join Date: Oct 2021
Old 07-03-2023 , 07:01   I'm looking for a plugin
Reply With Quote #1

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
q1085909155 is offline
Austin
Senior Member
Join Date: Oct 2005
Old 07-06-2023 , 15:33   Re: I'm looking for a plugin
Reply With Quote #2

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
    
}

Attached Thumbnails
Click image for larger version

Name:	PrivateServer.jpg
Views:	54
Size:	60.9 KB
ID:	201112  
Austin is offline
q1085909155
Member
Join Date: Oct 2021
Old 07-07-2023 , 03:23   Re: I'm looking for a plugin
Reply With Quote #3

Quote:
Originally Posted by Austin View Post
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.

Last edited by q1085909155; 07-07-2023 at 03:24.
q1085909155 is offline
azalty
AlliedModders Donor
Join Date: Feb 2020
Location: France
Old 07-07-2023 , 11:43   Re: I'm looking for a plugin
Reply With Quote #4

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
Attached Files
File Type: smx no_dupe_account_tf2.smx (46.6 KB, 43 views)
File Type: sp Get Plugin or Get Source (no_dupe_account_tf2.sp - 26 views - 74.2 KB)
__________________
GitHub | Discord: @azalty | Steam

Last edited by azalty; 07-07-2023 at 11:45.
azalty is offline
q1085909155
Member
Join Date: Oct 2021
Old 07-07-2023 , 11:45   Re: I'm looking for a plugin
Reply With Quote #5

Quote:
Originally Posted by azalty View Post
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!
q1085909155 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:24.


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