That could be made by an advanced scripter... but it would take a hell of a confusing code to make as far as I can tell...
You'd need:
-Something that can scan the playerlist
-Something that can scan each player found earlier for team
-Something to find the count of that team in the list
-Something to set the vehicle's team, for earlier
-Something to lock stuff and edit prefs
-And some minigame editing thingamajiggarz.