Author Topic: Minigame Functions - Testing TeamName  (Read 557 times)

How do I test the team a client is in during a minigame?
My guess is %client.teamName, but I am getting weird results when I rest it.


Just a regular minigame.  No special addons.

Clients do not have a team in the default game - "Team Chat" will instead send a message to all people in the same minigame as you. (This + Invite Only makes a private chat possible)

The way to find a client's team for the Team Deathmatch mod is %client.tdmTeam, a number from -1 to 5. The name of the team is %client.minigame.teamName[%client.tdmTeam].

If making your own mod, do not use %client.team as a variable - this interferes with default global chat and will make it so other people can't hear you at all.

Alright, I didn't know default minigames had no teams.  So, I looked in the TDM code, and I am pretty sure the variable I'm looking for is %client.tdmteam.  I assume if they are in the first team, then the variable %client.tdmteam is 1, second would be 2, and so on.  Unless someone tells me otherwise, I guess this problem is solved.

Try reading Space Guy's post, it explains everything you needed to know.

-1 = no team
"" = no team (shouldn't happen unless the game mode is teams-disabled)
0 = team 1
1 = team 2
...
5 = team 6

ok, thanks.

I read through it, and for some reason I forgot the for() statement started with zero, not one.  I guess I assumed that no team would be false, and therefore 0.  Locking now, thanks for the help.