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

[CS:GO/CS:S] CountryTags (UPDATE 17/08/2018)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
potatoz
AlliedModders Donor
Join Date: Nov 2016
Plugin ID:
5536
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Gives players and admins clan tags based on their country code and rank.
    Old 02-17-2017 , 08:55   [CS:GO/CS:S] CountryTags (UPDATE 17/08/2018)
    Reply With Quote #1

    COUNTRYTAGS
    as made by potatoz



    EXAMPLES
    ADMFLAG_ROOT HEAD-ADMIN | SE potatoz
    ADMFLAG_GENERIC ADMIN | UK brittman
    NO FLAGS FR baguette

    If a tag is not found for a clients location or their location is unkown they will be given the tag "NA" as in "Not Available" just to make sure it still fits in to the ever so beautiful scoreboard

    INSTALLATION
    1. Download the compiled plugin attached to the bottom of this post
    2. Put the compiled plugin in your server plugin directory (addons/sourcemod/plugins)
    3. Profit!!!
    Attached Files
    File Type: sp Get Plugin or Get Source (country_clantag.sp - 1377 views - 3.2 KB)

    Last edited by potatoz; 08-17-2018 at 07:02. Reason: Remade code
    potatoz is offline
    Pala4
    Senior Member
    Join Date: Dec 2007
    Old 02-19-2017 , 05:44   Re: [CS:GO/CS:S] CountryTags (1.0, 17-02-2017)
    Reply With Quote #2

    Hello, the plugin works but too many errors in the log.

    Spoiler
    Pala4 is offline
    potatoz
    AlliedModders Donor
    Join Date: Nov 2016
    Old 02-22-2017 , 14:16   Re: [CS:GO/CS:S] CountryTags (1.0, 17-02-2017)
    Reply With Quote #3

    Quote:
    Originally Posted by Pala4 View Post
    Hello, the plugin works but too many errors in the log.

    Spoiler
    Hi, unless you need the BOT-tag you may download the source and remove the small block of code for just that and recompile.
    __________________
    potatoz is offline
    Avi3ator
    New Member
    Join Date: Nov 2017
    Old 11-22-2017 , 15:18   Re: [CS:GO/CS:S] CountryTags (1.0, 17-02-2017)
    Reply With Quote #4

    Quote:
    Originally Posted by potatoz View Post
    Hi, unless you need the BOT-tag you may download the source and remove the small block of code for just that and recompile.
    Can you describe a little bit more? i cant even compile the source code without getting errors
    Avi3ator is offline
    potatoz
    AlliedModders Donor
    Join Date: Nov 2016
    Old 12-28-2017 , 05:22   Re: [CS:GO/CS:S] CountryTags (1.0, 17-02-2017)
    Reply With Quote #5

    Quote:
    Originally Posted by Avi3ator View Post
    Can you describe a little bit more? i cant even compile the source code without getting errors
    I've updated the code to not include the bot-tag by default
    __________________
    potatoz is offline
    Niklavs
    BANNED
    Join Date: Nov 2018
    Location: https://t.me/pump_upp
    Old 11-17-2018 , 09:22   Re: [CS:GO/CS:S] CountryTags (UPDATE 17/08/2018)
    Reply With Quote #6

    I Renamed Admin Clan Tags in country_clantag.sp, but it still shows HEAD-ADMIN and ADMIN!
    How Do i fix it? Or You fix it

    Code:
    #include <sourcemod>
    #include <geoip>
    #include <cstrike>
    
    #pragma semicolon 1 
     
    public Plugin myinfo =
    {
    	name = "Country Clantags",
    	author = "Potatoz",
    	description = "Gives Admins and Players specific Country-Tags on Scoreboard",
    	version = "1.0",
    	url = "http://www.sourcemod.net/"
    };
    
    public void OnPluginStart()
    {
    	CreateTimer(1.0, Timer_SetClanTag, _, TIMER_REPEAT);
    }
    
    public Action Timer_SetClanTag(Handle timer)
    {
    	for (int i = 1; i <= MaxClients; i++) 
        {
    		if(IsValidClient(i) && !IsFakeClient(i))
    		{
    		
    		char ip[16], geocode2[3], auth[32], clantag[45];
    		
    		GetClientIP(i, ip, sizeof(ip));
    		GeoipCode2(ip, geocode2);
    		GetClientAuthId(i, AuthId_Steam2, auth, sizeof(auth), false);
    
    		if(StrEqual(auth, "STEAM_0:1:201912335", false))
    			Format(clantag, sizeof(clantag), "Owner | %s", geocode2);
    		else if(CheckCommandAccess(i, "root_admin", ADMFLAG_ROOT, false))
    			Format(clantag, sizeof(clantag), "Omega Admin | %s", geocode2);
    		else if(CheckCommandAccess(i, "generic_admin", ADMFLAG_GENERIC, false))
    			Format(clantag, sizeof(clantag), "Alpha Admin | %s", geocode2);
    		else Format(clantag, sizeof(clantag), "%s", geocode2);
    		
    		if(geocode2[0] == EOS )
    		Format(clantag, sizeof(clantag), "NA");
    		
    		CS_SetClientClanTag(i, clantag);
    		
    		}
    	}
    	return Plugin_Continue;
    }
    
    public Action OnClientCommandKeyValues(int client, KeyValues kv) 
    { 
    	char sCmd[64];
    
    	if (kv.GetSectionName(sCmd, sizeof(sCmd)) && StrEqual(sCmd, "ClanTagChanged", false)) 
    	{ 
    		if(IsValidClient(client) && !IsFakeClient(client)) 
    		{
    		
    		char ip[16], geocode2[3], auth[32], clantag[45];
    		
    		GetClientIP(client, ip, sizeof(ip));
    		GeoipCode2(ip, geocode2);
    		GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth), false);
    
    		if(StrEqual(auth, "STEAM_0:1:201912335", false))
    			Format(clantag, sizeof(clantag), "Owner | %s", geocode2);
    		else if(CheckCommandAccess(client, "root_admin", ADMFLAG_ROOT, false))
    			Format(clantag, sizeof(clantag), "Omega Admin | %s", geocode2);
    		else if(CheckCommandAccess(client, "generic_admin", ADMFLAG_GENERIC, false))
    			Format(clantag, sizeof(clantag), "Alpha Admin | %s", geocode2);
    		else Format(clantag, sizeof(clantag), "%s", geocode2);
    			
    		if(geocode2[0] == EOS )
    		Format(clantag, sizeof(clantag), "NA");
    		
    		CS_SetClientClanTag(client, clantag);
    		
    		}
    	}
    	return Plugin_Continue;
    }
    
    bool:IsValidClient( client ) 
    {
        if ( !( 1 <= client <= MaxClients ) || !IsClientInGame(client) ) 
            return false; 
         
        return true; 
    }
    Niklavs is offline
    Send a message via ICQ to Niklavs Send a message via AIM to Niklavs Send a message via Yahoo to Niklavs
    potatoz
    AlliedModders Donor
    Join Date: Nov 2016
    Old 12-29-2018 , 06:29   Re: [CS:GO/CS:S] CountryTags (UPDATE 17/08/2018)
    Reply With Quote #7

    Quote:
    Originally Posted by Niklavs View Post
    I Renamed Admin Clan Tags in country_clantag.sp, but it still shows HEAD-ADMIN and ADMIN!
    there is no reason for it to stay the same unless you either haven't compiled your edit or you have compiled it but you still have the original, unedited version loaded
    __________________
    potatoz is offline
    Reply


    Thread Tools
    Display Modes

    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 02:15.


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