for(new i=0;i<MAX_HOUSES;i++) { if(i==..........) //to make sure it's a house { CreatePickup(...............); } }