[CS:GO] Getting team name
If all players in a certain team (either terrorist or counter-terrorist) have the same clan tag, then CS:GO will automatically name that team after the clan.
You can use mp_teamname_1/mp_teamname_2 to override that team name, but if CS:GO selects the team name automatically, then those cvar's will remain empty. I am looking to obtain the name of a team that was automatically set by CS:GO. In this case the mp_teamname_x cvar's will be empty, so I can't use those. Is anyone aware of a way to do this? |
Re: [CS:GO] Getting team name
Have you tried GetTeamName?
|
Re: [CS:GO] Getting team name
Unfortunately, it seems that functions returns either "TERRORIST" OR "COUNTER-TERRORIST" when the team names aren't explicitly set by cvar.
|
Re: [CS:GO] Getting team name
So what about netprops?
|
Re: [CS:GO] Getting team name
Currently I am just looping through all the players in a team to get their clan tag using CS_GetClientClanTag. It works. But I believe this will get me the tag of the steam group, and not it's name. And I believe the teams are named after the steam group name, not after the tag.
So if anyone has a better idea, I would be really interested. net_props seems like the way to go, but I have no clue where to start. |
Re: [CS:GO] Getting team name
Not sure what you could use (possibly an extension), that takes the id that it gives you and query the actual group name. Taking it a step further from what you are currently doing. Using Steam's API.
If I can better explain or provide an example, I will later. |
Re: [CS:GO] Getting team name
Thanks for chipping in guys.
For anyone stumbling on this thread at a later time, I though I'd post the code I have so far. This snippet checks whether all non-bots in a team have the same clan tag and if so, it stores that clan tag in a string. Code:
int team = CS_TEAM_T; //for example |
Re: [CS:GO] Getting team name
Hello,
i think i have nearly the same problem. Must know the Teamname of a team to know where i must update my score db. |
Re: [CS:GO] Getting team name
PHP Code:
|
Re: [CS:GO] Getting team name
I don't have the time to test that right now, but it looks wonderful!
Thanks! |
All times are GMT -4. The time now is 10:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.