go here:
and look at gfdmsp.exe
look at the code under misc, dmsp.qc. you'll need to track down all the variables and function calls in world.qc and defs.qc. this is from aardappel's dmsp mod. it will solve all your problems. the two functions in dmsp.qc will both select a spawn point and cycle to the next empty spawn point. i even figured out a way to spawn a mob instead of just one monster, but that's not in there
if you want i could probably email this one file. it's pretty small