Code:
public pfn_keyvalue(ent){
static bool:first_run=true
new id
if(first_run){
for(new i=0;i<32;i++){
id=create_entity("info_player_start")
if(id>0){
dyn_spawn_count++
dyn_spawn_ids[dyn_spawn_count]=id
entity_set_int(id,EV_INT_iuser1,1)//flag ent so we know it's one we made
//DispatchKeyValue(temp_ent,"origin","0 0 0")
//DispatchKeyValue(temp_ent,"angles","0 0 0")
}
}
first_run=false
}
}
That is the basics of what you need. However this only adds ct spawns, and these spawn points aren't assigned an origin so they will be located at 0,0,0 and will therefore be disabled, but it will allow people to join the team. I believe that using just this code will result in telefragging some players when they spawn.
Spawn points are cached by the engine during the map loading process, so all modification of them needs to be done using the pfn_keyvalue forward, which runs while the map is being loaded, each time an entity is assigned a key(ie: several iterations per entity). If you want to do this with a plugin you'll have to write some code in addition to what I've pasted that will find a safe location for the spawn points in proximity to the ones that already come with the map.