Issue writing with net.

So I’m using a custom chatbox.

This is how it prints messages in console:


		net.Start("ChatSendToClient")
		net.WriteString(text)
		net.WriteEntity(ply)
		net.WriteString(tag)
		net.WriteTable({tag = Color(51,51,51), name = team.GetColor(ply:Team()), text = Color(255,255,255)})
		net.WriteString(font)
		net.Send(player.GetAll())

Notice how it sends to all players?
I want to make it so it sends to a selection of TEAMs.
I tried a singular team, however other users were able to see it.

This was what I tried:


if v:Team() == TEAM_GANG then
    net.Start("ChatSendToClient")
			net.WriteString(text)
		net.WriteEntity(ply)
		net.WriteString(tag)
      		net.WriteTable({tag = Color(0,255,0), name = team.GetColor(ply:Team()), text = Color(255,255,255)})
					net.WriteString(font)
    net.Send(v)
  end

This is how the normal DarkRP executes the gang chat:


					GAMEMODE:TalkToPerson(target, col, DarkRP.getPhrase("group") .. " " .. ply:Nick(), Color(255,255,255,255), text, ply)

Try replacing this:


if v:Team() == TEAM_GANG then
    net.Start("ChatSendToClient")
			net.WriteString(text)
		net.WriteEntity(ply)
		net.WriteString(tag)
      		net.WriteTable({tag = Color(0,255,0), name = team.GetColor(ply:Team()), text = Color(255,255,255)})
					net.WriteString(font)
    net.Send(v)
  end

With this:


if v:Team() == TEAM_GANG then
    net.Start("ChatSendToClient")
			net.WriteString(text)
		net.WriteEntity(v)
		net.WriteString(tag)
      		net.WriteTable({tag = Color(0,255,0), name = team.GetColor(v:Team()), text = Color(255,255,255)})
					net.WriteString(font)
    net.Send(v)
  end

http://wiki.garrysmod.com/page/team/GetPlayers ?