for(i=0; i<NPART; i++)
{
if(parts[i].type == TypeYouWantHere)
{
Thing you want to do here;
}
}
for(i=0; i<NPART; i++)
{
if(parts[i].type == PT_METL)
{
parts[i].life = 9999;
}
}
for (i=0 ; i<NPART); i+=1)
if (parts[i].type)
{
x = (int)(parts[i].x+0.5f);
y = (int)(parts[i].y+0.5f);
*stuff with coords x,y here*
}