[Help] how to put players in teams?

hi everyone, these screenshots are my spawning system. when player joins, a pawn spawns for him and he can turn around. its team deathmatch and spawning based on start tags number. (first player at start tag 0, second at 1 and…) so how i can put them in a team using this PlayerTag integer? how system understands which player is in team A or B? is player state needed?
lots of questions i have but i didn’t found a nice related tutorial.
thanks in advance

UE4 dont have team system, it up to you how you implement it. You should have team assigned in PlayerController and set spawn controls based on that.

PlayerState will be needed if you use network multiplayer to shere public data about player with other clients as PlayerController is replicated only to controller owner for security reasons. Same goes with GameMode existing only in server thats why you got GameState