void create_monster_spawns()
{
	var counter = 0;
	if(monster_area == 0)
	{
		var i;
		for(i = 0 ; i < smamb.monster_block_count; i++)
		{
			CONTACT* c1[5000];
			spawn[i] = ent_create("spawn.mdl",vector(0, 0,3000),NULL);
			spawn[i].skill[1] = i;
			spawn[i].skill[2] = monster_data[i].monster_name;
			spawn[i].skill[3] = monster_data[i].monster_uid;
			spawn[i].skill[4] = monster_data[i].spawn_min_x;
			spawn[i].skill[5] = monster_data[i].spawn_min_y;
			spawn[i].skill[6] = monster_data[i].spawn_max_x;
			spawn[i].skill[7] = monster_data[i].spawn_max_y;
			spawn[i].skill[8] = monster_data[i].monster_max_count;
			spawn[i].skill[9] = monster_data[i].monster_respawn_count;
			spawn[i].skill[10] = monster_data[i].monster_respawn_time;
			spawn[i].skill[11] = monster_data[i].monster_type;
			
			ent_clone(spawn[i]);
			
			ball1[i] = ent_create("ball.mdl",vector(monster_data[i].spawn_max_x *40, monster_data[i].spawn_max_y *40,2000),NULL);
			ball2[i] = ent_create("ball.mdl",vector(monster_data[i].spawn_min_x *40, monster_data[i].spawn_min_y *40,2000),NULL);
			set(ball1[i],INVISIBLE);
			set(ball2[i],INVISIBLE);
			
			c1[i] = ent_getvertex(spawn[i],NULL,2);  
			c1[i].v = NULL;
			c1[i].x = ball1[i].x ;
			c1[i].y = ball1[i].y ;
			ent_setvertex(spawn[i],c1[i],2);
			
			c1[i] = ent_getvertex(spawn[i],NULL,3);  
			c1[i].v = NULL;
			c1[i].x = ball1[i].x ;
			c1[i].y = ball2[i].y ;
			ent_setvertex(spawn[i],c1[i],3);
			
			c1[i] = ent_getvertex(spawn[i],NULL,4);  
			c1[i].v = NULL;
			c1[i].x = ball2[i].x ;
			c1[i].y = ball2[i].y ;
			ent_setvertex(spawn[i],c1[i],4);
			
			c1[i] = ent_getvertex(spawn[i],NULL,1);  
			c1[i].v = NULL;
			c1[i].x = ball2[i].x ;
			c1[i].y = ball1[i].y ;
			ent_setvertex(spawn[i],c1[i],1);
		}
		monster_area = 1;
	}
	else
	{
		while(counter <smamb.monster_block_count)
		{
			ptr_remove(ball1[counter]);
			ptr_remove(ball2[counter]);
			ptr_remove(spawn[counter]);
			counter += 1;
		}
		monster_area = 0;
	}
}