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

Ban players which are in certain steam groups?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 09-06-2017 , 09:52   Ban players which are in certain steam groups?
Reply With Quote #1

Hello, can someone make plugin, which will check for certain groups and if is player in that steam group then perm ban him? I'm talking about groups , which are not set as ClanTags. So basically check whole profile of that player (on player join) for example by groupID64 and then ban them. Can anyone make this?

(I'm willing to pay $$$)

Last edited by ASKER_CZ; 09-06-2017 at 09:58.
ASKER_CZ is offline
Cripix
Senior Member
Join Date: Sep 2016
Location: French, Bordeaux
Old 09-06-2017 , 10:23   Re: Ban players which are in certain steam groups?
Reply With Quote #2

This is a function included in SourceBans.

You must activate the "Group Banning" in Admin Panel -> Features.

And a new category is adding in Bans "Group Ban"
__________________
My jailbreak Server :

Last edited by Cripix; 09-06-2017 at 10:23.
Cripix is offline
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 09-06-2017 , 10:37   Re: Ban players which are in certain steam groups?
Reply With Quote #3

Are you sure ? Does it detect all groups, or just by clantag?

Last edited by ASKER_CZ; 09-06-2017 at 10:37.
ASKER_CZ is offline
Cripix
Senior Member
Join Date: Sep 2016
Location: French, Bordeaux
Old 09-06-2017 , 10:42   Re: Ban players which are in certain steam groups?
Reply With Quote #4

Hmmm I don't know I never try
__________________
My jailbreak Server :
Cripix is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 09-06-2017 , 11:12   Re: Ban players which are in certain steam groups?
Reply With Quote #5

Quote:
Originally Posted by Cripix View Post
This is a function included in SourceBans.

You must activate the "Group Banning" in Admin Panel -> Features.

And a new category is adding in Bans "Group Ban"
It one-time mass-bans members in the group of your choosing, it does not auto detect and ban.
__________________
sneaK is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 09-06-2017 , 13:50   Re: Ban players which are in certain steam groups?
Reply With Quote #6

Dont forget edit banned group id. Good luck!

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <steamworks>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

ConVar g_Enabled;
bool b_IsMember[MAXPLAYERS 1];

public 
Plugin myinfo = {
    
name "Ban Groups",
    
author "Vortéx!",
    
version "1.0",
    
url "sourceturk.net"
}

public 
OnPluginStart() {
    
g_Enabled CreateConVar("sm_bangroups_enable""1""0 - disable, 1 - enable"_true0.0true1.0);    
}


public 
void OnClientPostAdminCheck(int client) {
    if(
GetConVarBool(g_Enabled)) {
        
b_IsMember[client] = false;
        
SteamWorks_GetUserGroupStatus(clientbannedgroupid);     // IMPORTANT!
        
CreateTimer(7.0checkclient); // for check
    
}
}

public 
Action check(Handle timerint client) {
    if(
b_IsMember[client])
    {
        
BanClient(client0BANFLAG_AUTO"Banned for being in a blocked group""Group Ban"""0);
    }
}

// from xines public plugin //
public int SteamWorks_OnClientGroupStatus(int authidint groupAccountIDbool isMemberbool isOfficer) {
    
int client UserAuthGrab(authid);
    if (
client != -&& isMemberb_IsMember[client] = true;
    return;
}

int UserAuthGrab(int authid)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            
char charauth[64], authchar[64];
            
GetClientAuthId(iAuthId_Steam3charauthsizeof(charauth));
            
IntToString(authidauthcharsizeof(authchar));
            if(
StrContains(charauthauthchar) != -1) return i;
        }
    }
    
    return -
1;

__________________

Last edited by vortex.; 09-06-2017 at 13:50.
vortex. is offline
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 09-06-2017 , 14:32   Re: Ban players which are in certain steam groups?
Reply With Quote #7

Nice. Please can you make support for more groups? + also trigger command sm_ban (to show up in sourcebans banlist)

Last edited by ASKER_CZ; 09-06-2017 at 14:32.
ASKER_CZ is offline
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 09-06-2017 , 14:51   Re: Ban players which are in certain steam groups?
Reply With Quote #8

When I get home I would make that plugin for you.
__________________
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 09-06-2017 , 15:50   Re: Ban players which are in certain steam groups?
Reply With Quote #9

PHP Code:
BanClient(client0BANFLAG_AUTO"Banned for being in a blocked group""Group Ban"""0); 
change to

PHP Code:
ServerCommand("sm_ban %s Banned for being in a blocked group"client); 
I'm not at home. So, I cant make multi group feature right now dude
__________________

Last edited by vortex.; 09-06-2017 at 15:51.
vortex. is offline
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Old 09-06-2017 , 18:43   Re: Ban players which are in certain steam groups?
Reply With Quote #10

Not tested.

PHP Code:
#pragma semicolon 1

#define DEBUG

#include <sourcemod>
#include <sdktools>
#include <steamworks>

#pragma newdecls required

char strIds[32];
ConVar gb_Groupidsgb_BanTimegb_BanReason;
bool gb_IsMember[MAXPLAYERS 1] = false;

public 
void OnPluginStart()
{
    
gb_Groupids CreateConVar("sm_group_ids""15125125, 123123""Set your ids. max 12 ids seperate with comma ', ')");
    
gb_BanTime CreateConVar("sm_ban_time""10""Set ");
    
gb_BanReason CreateConVar("sm_ban_reason""You're banned""Set the ban reason");
    
AutoExecConfig(true);
}

public 
void OnConfigsExecuted()
{

    
char strId[128], strIds2[12][32];
    
gb_Groupids.GetString(strIdssizeof(strIds));
    
ReplaceString(strIdssizeof(strIds), " """); // credits to shanapu
    
int iCount ExplodeString(strIds","strIds2sizeof(strIds2), sizeof(strIds2[]));

    for (
int i 0iCounti++)
    {
        
Format(strIdsizeof(strId), "%s"strIds2[i]);
    }
}

public 
void OnClientPutInServer(int client
{
    
gb_IsMember[client] = false;
    
int Id StringToInt(strIds);
    
SteamWorks_GetUserGroupStatus(clientId);  
    
CreateTimer(5.0CheckPlayerclient); 
   
}

public 
Action CheckPlayer(Handle timerint client
{
    if(
gb_IsMember[client])
    {
        
char sBan[56], sBanReason[56];
        
gb_BanReason.GetString(sBanReasonsizeof(sBanReason));
        
Format(sBansizeof(sBan), "sm_ban #%i %i %s"GetClientOfUserId(client), gb_BanTime.IntValuesBanReason);
           
ServerCommand(sBan);
    }
}

// credits to xines
public int SteamWorks_OnClientGroupStatus(int authidint groupAccountIDbool isMemberbool isOfficer)
{
    
int client UserAuthGrab(authid);
    
    if (
client != -&& isMember)
    {
        
gb_IsMember[client] = true;
    }
    
    return;
}

int UserAuthGrab(int authid)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            
char charauth[64], authchar[64];
            
GetClientAuthId(iAuthId_Steam3charauthsizeof(charauth));
            
IntToString(authidauthcharsizeof(authchar));
            if(
StrContains(charauthauthchar) != -1) return i;
        }
    }
    
    return -
1;

__________________
Also known as Hardy`.

Feel free to contact me if you have a private plugin request!

My Steam Profile | Discord: Hardy`#3792

Last edited by stephen473; 09-06-2017 at 18:45.
stephen473 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 04:35.


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