Raised This Month: $32 Target: $400
 8% 

Block Tag Groups Steam


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-24-2021 , 08:23   Block Tag Groups Steam
Reply With Quote #1

I have a plugin to block the TAGS of all steam groups, without exception:
PHP Code:
#include <sourcemod>

public Action OnClientCommandKeyValues(int clientKeyValues kv

    
char sCmd[64]; 
     
    if (
kv.GetSectionName(sCmdsizeof(sCmd)) && StrEqual(sCmd"ClanTagChanged"false)) 
    { 
       return 
Plugin_Handled
    } 
     
    return 
Plugin_Continue

What I would like, add a check for players with privileges, where those who have privileges can use the TAGS of the steam group they want without being blocked.

Could anyone help with that?
paulo_crash is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-24-2021 , 13:05   Re: Block Tag Groups Steam
Reply With Quote #2

You can make this more complex how you like.
This version is just simple, it check if player is in SM admin cache (sm_dump_admcache) it not block clan tag change.

PHP Code:
public Action OnClientCommandKeyValues(int clientKeyValues kv)
{
    
char buffer[MAX_NAME_LENGTH];

    if(
kv.GetSectionName(buffersizeof(buffer)) && StrEqual(buffer"ClanTagChanged"false))
    {
        if(
kv.GetString("tag"buffersizeof(buffer), "") && buffer[0] != '\0')
        {

            
//PrintToServer("OnClientCommandKeyValues %s", buffer);
            
            // Option 1 - admin flag "a" or admin group override "ClanTagChanged" "allow"
            //return CheckCommandAccess(client, "ClanTagChanged", ADMFLAG_RESERVATION, true) ? Plugin_Continue:Plugin_Handled;
            
            // Option 2 - If player is added in admin cache, even without permissions (VIP ?)
            
AdminId adminid GetUserAdmin(client);
            
            return 
adminid == INVALID_ADMIN_ID Plugin_Handled:Plugin_Continue;
        }
    }
    
    return 
Plugin_Continue;

__________________
Do not Private Message @me
Bacardi is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-25-2021 , 06:24   Re: Block Tag Groups Steam
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
You can make this more complex how you like.
This version is just simple, it check if player is in SM admin cache (sm_dump_admcache) it not block clan tag change.

PHP Code:
public Action OnClientCommandKeyValues(int clientKeyValues kv)
{
    
char buffer[MAX_NAME_LENGTH];

    if(
kv.GetSectionName(buffersizeof(buffer)) && StrEqual(buffer"ClanTagChanged"false))
    {
        if(
kv.GetString("tag"buffersizeof(buffer), "") && buffer[0] != '\0')
        {

            
//PrintToServer("OnClientCommandKeyValues %s", buffer);
            
            // Option 1 - admin flag "a" or admin group override "ClanTagChanged" "allow"
            //return CheckCommandAccess(client, "ClanTagChanged", ADMFLAG_RESERVATION, true) ? Plugin_Continue:Plugin_Handled;
            
            // Option 2 - If player is added in admin cache, even without permissions (VIP ?)
            
AdminId adminid GetUserAdmin(client);
            
            return 
adminid == INVALID_ADMIN_ID Plugin_Handled:Plugin_Continue;
        }
    }
    
    return 
Plugin_Continue;

Thanks for the help, let's get feedback.

I tested on my servers, I do not enter the TAG of the Steam Group that I have selected, however when I go to the CSGO settings, I change the TAGS of the Steam Group it starts showing, but the TAGS end again, the round ends again.

NOTE: Just copy and paste and compile the code above.

If you want I can record a video for you to check how it is currently.

I took the liberty of making a video: https://vimeo.com/516653131

Last edited by paulo_crash; 02-25-2021 at 06:35.
paulo_crash is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-25-2021 , 10:46   Re: Block Tag Groups Steam
Reply With Quote #4

wtf
Have to look later.
Bacardi is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-25-2021 , 15:26   Re: Block Tag Groups Steam
Reply With Quote #5

Not happen on me.

You should test, remove this plugin (AND your first post plugin if you still have it loaded).
Make sure it's not loaded, sm plugins list.

So now, players are allowed to change Clan Tag.
But, try repeat same process like in video. (change tag, kill, change team ?). Does it work ?

If problem still exist, I guess, you maybe have another plugin what clear player clan tag.
Bacardi is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-25-2021 , 16:08   Re: Block Tag Groups Steam
Reply With Quote #6

Quote:
Originally Posted by Bacardi View Post
If problem still exist, I guess, you maybe have another plugin what clear player clan tag.
I believe it can be that, I have a plugin that puts TAGS in the players and he must force to remove the TAGS.

I will confirm all of this, and anything notice here, thanks for now.
paulo_crash is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-27-2021 , 20:10   Re: Block Tag Groups Steam
Reply With Quote #7

@Bacardi, it was really a plugin that I have TAGS for players with privileges.

I'll be working on both now to see if I can get them compatible with each other.

Thank you for your help.
paulo_crash is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-28-2021 , 02:28   Re: Block Tag Groups Steam
Reply With Quote #8

Good ^^
__________________
Do not Private Message @me
Bacardi 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 22:35.


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