Is my Gamemode possible?

I have been working on a gamemode, but I just realized some of the major features (which I haven’t started on yet) might not be possible. Can you guys tell me if they are possible with Lua, and preferably how? Thanks in advance.

  1. After starting the game, is it possible to create new teams, without restarting? If it is possible, would this be the way to do it?

function TeamCreate(name,R,G,B)
function GM:CreateTeams()
TEAM=TEAM+1
	if ( !GAMEMODE.TeamBased ) then return end
 
	team.SetUp( TEAM, name, Color( R, G, B ), true )
	team.SetSpawnPoint( TEAM, { "info_player_start", "info_player_terrorist", "info_player_rebel", "info_player_deathmatch" } )
	team.SetClass( TEAM, { "Human" } ) // "Human" is the class we want players to use
	end
end

  1. Is it possible to make it so certain tools are only accessible by certain classes? for example, if I only wanted engineers to use WireMod?

  2. Can I decide which classes can spawn which items individually? E.g., let Soldiers spawn infinite guns but no building supplies, architects can spawn unlimited building supplies and no guns, and citizens have to pay to spawn stuff?

Yeah, its possible, contact me if you need any help.