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

Is it possible to prevent frequent change clan tag (CSGO).


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad Cold Man
Senior Member
Join Date: Apr 2014
Old 11-29-2015 , 02:45   Is it possible to prevent frequent change clan tag (CSGO).
Reply With Quote #1

Hello!

Is it possible to prevent frequent change clan tag?

Please help me to solve this problem.

More info: http://steamcommunity.com/sharedfile...chtext=dynamic
__________________

Last edited by Bad Cold Man; 11-29-2015 at 02:56.
Bad Cold Man is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 11-29-2015 , 03:07   Re: Is it possible to prevent frequent change clan tag (CSGO).
Reply With Quote #2

Create a timer, save their clan tag with the function below and if they're different, add to an increment for the client in a player array and just kick them if they hit a certain amount of clan tag detection changes?

https://sm.alliedmods.net/new-api/cs...tClientClanTag
Drixevel is offline
Bad Cold Man
Senior Member
Join Date: Apr 2014
Old 11-29-2015 , 07:56   Re: Is it possible to prevent frequent change clan tag (CSGO).
Reply With Quote #3

Yes. Kick them or ban for ~10 minutes.
__________________
Bad Cold Man is offline
Bad Cold Man
Senior Member
Join Date: Apr 2014
Old 12-01-2015 , 03:03   Re: Is it possible to prevent frequent change clan tag (CSGO).
Reply With Quote #4

Already helped me but thanks anyway.

Original

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

#define PLUGIN_VERSION "1.0.0.0"
public Plugin:myinfo =
{
    
name         "No Tag Flood",
    
author         "AlexTheRegent",
    
description "",
    
version     PLUGIN_VERSION,
    
url         ""
}

#pragma newdecls required
char    g_szOldTag[MAXPLAYERS+1][12];
int     g_iWarnings[MAXPLAYERS+1] = 0;
int     g_iMaxWarnings;
int     g_iBanLength;

public 
void OnPluginStart() 
{
    
CreateConVar("sm_notagflood_maxwarns",     "3",     "сколько раз игрок может сменить тэг за одно подключение",                     FCVAR_PLUGINtrue1.0);
    
CreateConVar("sm_notagflood_banlen",     "10",     "время бана в минутах (0 - только кик, -1 (минус один) - бан навсегда)",     FCVAR_PLUGIN);
}

public 
void OnConfigsExecuted() 
{
    
g_iMaxWarnings     FindConVar("sm_notagflood_maxwarns").IntValue;
    
g_iBanLength     FindConVar("sm_notagflood_banlen").IntValue;
}

public 
void OnClientPutInServer(int iClient)
{
    
CS_GetClientClanTag(iClientg_szOldTag[iClient], sizeof(g_szOldTag[]));
    
g_iWarnings[iClient] = 0;
}

public 
void OnClientSettingsChanged(int iClient)
{
    if ( 
iClient && iClient <= MaxClients && IsClientInGame(iClient) ) {
        
char szCurrentTag[12];
        
CS_GetClientClanTag(iClientszCurrentTagsizeof(szCurrentTag));
        if ( 
strcmp(szCurrentTagg_szOldTag[iClient], true) ) {
            if ( ++
g_iWarnings[iClient] >= g_iMaxWarnings ) {
                if ( 
g_iBanLength ) {
                    
ServerCommand("sm_ban #%d %d \"Частая смена тэга (бан на %d минут)\""GetClientUserId(iClient), g_iBanLengthg_iBanLength);
                    
ServerCommand("sm_kick #%d \"Частая смена тэга (бан на %d минут)\""GetClientUserId(iClient), g_iBanLength);
                }
                else if ( 
g_iBanLength == -) {
                    
ServerCommand("sm_ban #%d 0 \"Вы забанены навсегда за частую смену тэгов\""GetClientUserId(iClient));
                    
ServerCommand("sm_kick #%d \"Вы забанены навсегда за частую смену тэгов\""GetClientUserId(iClient));
                }
                else {
                    
ServerCommand("sm_kick #%d \"Частая смена тэга\""GetClientUserId(iClient));
                }
                return;
            }
            
strcopy(g_szOldTag[iClient], sizeof(g_szOldTag[]), szCurrentTag);
        }
    }

__________________
Bad Cold Man is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 12-01-2015 , 03:13   Re: Is it possible to prevent frequent change clan tag (CSGO).
Reply With Quote #5

Quote:
Originally Posted by Bad Cold Man View Post
Already helped me but thanks anyway.

Original
Or you can use this https://forums.alliedmods.net/showth...79#post2337679
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Bad Cold Man
Senior Member
Join Date: Apr 2014
Old 12-04-2015 , 07:30   Re: Is it possible to prevent frequent change clan tag (CSGO).
Reply With Quote #6

Quote:
Originally Posted by Franc1sco View Post
Don't work for me. I already tried to use it.
__________________
Bad Cold Man 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 12:26.


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