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

[TF2] Changing team name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 06-19-2015 , 16:55   [TF2] Changing team name
Reply With Quote #1

I am currently trying to change all 3 team names in TF2 (Spectator, Red, Blu), but with no success.

Relevant code:
PHP Code:
public OnMapStart()
{
RenameTeams();
}

stock RenameTeams()
{
    new 
iTeam = -1;
    
    new 
String:teamNameA[32], String:teamNameB[32], String:teamNameC[32];
    
    
Format(teamNameAsizeof(teamNameA), "A");
    
Format(teamNameBsizeof(teamNameB), "B");
    
Format(teamNameCsizeof(teamNameC), "C");
    
    while((
iTeam FindEntityByClassname(iTeam"tf_team")) != -1)
    {
        new 
iTeamNum GetEntData(iTeamFindSendPropInfo("CTFTeam""m_iTeamNum"));
        
        if(
iTeamNum == Team_Blue)
        {
            
SetEntDataString(iTeamFindSendPropInfo("CTFTeam""m_szTeamname"), teamNameA16true);
        }
        else if(
iTeamNum == Team_Red)
        {
            
SetEntDataString(iTeamFindSendPropInfo("CTFTeam""m_szTeamname"), teamNameB16true);
        }
        else if(
iTeamNum == Team_Spec)
        {
            
SetEntDataString(iTeamFindSendPropInfo("CTFTeam""m_szTeamname"), teamNameC16true);
        }
    }

I have also tried it with CTeam, but to no avail. Is it really not possible to change a team's name without enabling tournament mode (or sending a fake CVar value, causing glitches)?

Any help would be appreciated.
__________________
Stopped hosting servers as of November 2018, no longer active around here.

Last edited by pcmaster; 06-19-2015 at 16:56.
pcmaster is offline
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 06-20-2015 , 17:23   Re: [TF2] Changing team name
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=225505
https://forums.alliedmods.net/showthread.php?t=153778

or you can put in cfg/sourcemod/sourcemod.cfg

PHP Code:
mp_teamname_1 "Team1NewName"
mp_teamname_2 "Team2NewName" 

Last edited by hadesownage; 06-20-2015 at 17:37.
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
renancavalieri
AlliedModders Donor
Join Date: Feb 2015
Old 06-24-2015 , 09:46   Re: [TF2] Changing team name
Reply With Quote #3

Quote:
Originally Posted by hadesownage View Post
https://forums.alliedmods.net/showthread.php?t=225505
https://forums.alliedmods.net/showthread.php?t=153778

or you can put in cfg/sourcemod/sourcemod.cfg

PHP Code:
mp_teamname_1 "Team1NewName"
mp_teamname_2 "Team2NewName" 
Not tested yet, but I think this is only for CS:GO.

Last edited by renancavalieri; 06-24-2015 at 09:49.
renancavalieri is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 06-24-2015 , 10:37   Re: [TF2] Changing team name
Reply With Quote #4

Quote:
Originally Posted by renancavalieri View Post
Not tested yet, but I think this is only for CS:GO.
-snip-

Last edited by Mitchell; 06-25-2015 at 16:58.
Mitchell 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 15:20.


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