Creating Teams in a Gamemode

It’s hard to explain, but here goes:

I’ve used team.Setup to setup 4 different classes to use ( im not making a fretta gamemode ) but, how would I assign people to different teams, such as American and Russian?

If I HAVE to use team.Setup to do American and Russian, what alternative can I use to create different classes?

team.SetUp (4, “Guests”, Color (0, 0, 255, 255))

function JoinTeam4(ply)

concommand.Add(“team_4”, JoinTeam3)

But i’ve already used team.Setup to setup different classes such as Assault, Engineer, Medic and Recon (BC2 Gamemode) and used concommands so when the client click the Button on the menu, he/she spawns as the class they chose and with the weapons I set the class to spawn with.

I don’t understand what you’re asking for. -.-

don’t use team.setup for your classes, use it for your teams. you can index the player with something like “Class” so that you can tell what class the player is.

local function beengineer(ply,com,arg)
ply.Class = “engineer”

Yeah, sorry to everyone who failed to understand what I as asking for, it was sort of hard to explain what I as having trouble with, but uh… thanks for your help thegrb93, I will test as soon as I get the chance

That is probably the right idea, don’t use classes for team setup. However, if you want to you can. (ie do something like this)


ply.Faction = American or Russian


Then you just simply say if their this then send them on to that spawn and give them that model ETC.

Yeah it’s allright now, I just set up classes in functions, and used the two teams in team.Setup

Thanks guys!