Raised This Month: $ Target: $400
 0% 

[CS:GO] Team Logo Manager 1.4.2 [2016.04.09]


Post New Thread Reply   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-11-2015 , 11:16   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #91

Lol.

No hints from Valve in relation to this. Looks like they blocked it off for community servers.

Still haven't confirmed if the mp_teamlogo_* cvars even work at all anymore.
__________________
Neuro Toxin is offline
cTmoNe
AlliedModders Donor
Join Date: Jul 2010
Location: Germany
Old 06-13-2015 , 22:38   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #92

Working this plugin?
__________________


cTmoNe is offline
Laam4
Member
Join Date: Sep 2014
Old 06-14-2015 , 06:01   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #93

Quote:
Originally Posted by Neuro Toxin View Post
Lol.

No hints from Valve in relation to this. Looks like they blocked it off for community servers.

Still haven't confirmed if the mp_teamlogo_* cvars even work at all anymore.
Cvars still works, only doesn't show up on scoreboard. At least the logos show up on round end, when the MVP is announced.
Laam4 is offline
cTmoNe
AlliedModders Donor
Join Date: Jul 2010
Location: Germany
Old 06-14-2015 , 08:39   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #94

Quote:
Originally Posted by Laam4 View Post
Cvars still works, only doesn't show up on scoreboard. At least the logos show up on round end, when the MVP is announced.
Yea confirm, logo doesn't show up on scoreboard.
__________________


cTmoNe is offline
Apina
AlliedModders Donor
Join Date: May 2013
Old 06-14-2015 , 15:10   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #95

Quote:
Originally Posted by Laam4 View Post
Cvars still works, only doesn't show up on scoreboard. At least the logos show up on round end, when the MVP is announced.
Confirmed
Apina is offline
Apina
AlliedModders Donor
Join Date: May 2013
Old 06-15-2015 , 11:07   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #96

[SM] mp_teamlogo_1 set to alsen
[SM] mp_teamlogo_2 set to lemon

in server console
Apina is offline
itsjch
Member
Join Date: Apr 2015
Location: Australia
Old 06-16-2015 , 05:05   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #97

Please fix this!
itsjch is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-16-2015 , 05:09   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #98

Your asking the wrong person. Only valve can fix the logos not showing on the scoreboard
__________________
Neuro Toxin is offline
itsjch
Member
Join Date: Apr 2015
Location: Australia
Old 06-16-2015 , 05:14   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #99

Quote:
Originally Posted by Neuro Toxin View Post
Your asking the wrong person. Only valve can fix the logos not showing on the scoreboard
All well thanks for the reply and f""k! :c
__________________

itsjch is offline
decowboy
AlliedModders Donor
Join Date: Oct 2015
Location: Guadalajara, Mexico
Old 02-26-2016 , 14:49   Re: [CS:GO] Team Logo Manager 1.3.1 [26.04.2015]
Reply With Quote #100

Hi guys.

I expanded this plugin with the ability to automatically set the right team logo based on what players are in a team. Basically, this is how it works:

If all non-bot players in a team (either CT or T) have the same clan tag, then it'll fetch that clan tag. It will remove all non-alphanumeric characters from the clan tag and then take the first five characters. The resulting string will be set as the logo for that team.

So, for example:
The clan tag Donkey Meisters will become Donke
The clan tag 7Sins will become 7Sins
The clan tag ABC will become ABC
The clan tag A Butthole will become AButt
The clan tag ~!A!@# will become A

If you create custom logos for the teams that regularly play in your server and name them according to the above abbreviation (so, for example: AButt.png or ABC.png), then my function will set the proper team logo automatically.

Here's the snippet:
PHP Code:
public autoLogo(team) {
    
    
char name[65];
    
bool found false;
    
bool match true;
    
    for (
int i=1i<=MaxClientsi++) {
        if (
IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i)) {
            if (
GetClientTeam(i) == team) {
                
char newname[65];
                
CS_GetClientClanTag(inewnamesizeof(newname));
                if (
newname[0] != EOS) {
                    if (
found) {
                        if (!
StrEqual(namenewname)) {
                            
match false;
                        }
                    } else {
                        
found true;
                        
strcopy(namesizeof(name), newname);
                    }
                }
            }
        }
    }
    
    if (
team == CS_TEAM_CT) {
        
team 1;
    }
    if (
team == CS_TEAM_T) {
        
team 2;
    }
    
    if (
found && match) {
        
char logo[6];
        
        
int j=0;
        for (
int i=0i<= 64i++) {
            if (
name[i] == EOS || == 5) {
                
logo[j] = EOS;
                
j++;
                
65;
            } else if (
IsCharAlpha(name[i]) || IsCharNumeric(name[i])) {
                
logo[j] = name[i];
                
j++;
            }
        }
        
        
ServerCommand("mp_teamlogo_%d \"%s\""teamlogo);
    } else {
        
ServerCommand("mp_teamlogo_%d \"\""team);
    }
    
    
    

I then call the above function like this:
PHP Code:
public OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    
    
autoLogo(CS_TEAM_T);
    
autoLogo(CS_TEAM_CT);
    
}

public 
OnPlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast)
{
    
    
autoLogo(CS_TEAM_T);
    
autoLogo(CS_TEAM_CT);
    
}

public 
OnTeamChange(Handle:event, const String:name[], bool:dontBroadcast)
{
    
    
autoLogo(CS_TEAM_T);
    
autoLogo(CS_TEAM_CT);
    

Note 1: This function won't work for teams like Ninjas In Pyjamas, as their default logo name is nip, while this function will end up setting the team logo cvar to Ninja.

Note 2: This function will set the logo based on the players in the team. Setting a custom team name using mp_teamname_* won't effect the logo that will be selected.

Note 3: Be sure not to confuse the clan name (name of the Steam group) with the clan tag (abbreviation of the Steam group). This function uses the latter.

Note 4: Calling the function on player spawn, player disconnect and player team change is rather redundant, but the function is really light-weight and doing it this way will make sure the team logos are always set correctly.


Neuro Toxin, amigo, do you feel like expanding your plugin with this functionality?
If not, I'll publish a plugin for this myself and credit you for all the work you did.

Cheers!

Last edited by decowboy; 02-26-2016 at 17:11.
decowboy 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 17:47.


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