spawning an ai group or a player group?
for ai try this:
?!(local server):goto "end"
_gs=1
#groupspawn
"soldierwb" createunit [getmarkerpos "barracks", group alpha]
_gs=_gs+1
?(_gs>=11)goto:"end"
goto "groupspawn"
#end
exit
all off the top of my head, untested, but should be ok.....