12.02.2011, 08:21
Hi, having problems with converting this:
to foreach. Anyone who can show it?
pawn Код:
for(new i = 1; i < MAX_BUYABLE_VEH; i++)
for(new i = 1; i < MAX_BUYABLE_VEH; i++)
new Iterator:BVeh<MAX_BUYABLE_VEH>; Itter_Add(BVeh, vehicleid1); Itter_Add(BVeh, vehicleid2); Itter_Add(BVeh, vehicleid3); Itter_Add(BVeh, vehicleid4); foreach(BVeh, i) printf("vehicle: %d",i); // this is : for(new i = 1; i < MAX_BUYABLE_VEH; i++) Itter_Remove(BVeh, vehicleid3);
stock GetNewVehID()
{
for(new i = 1; i < MAX_BUYABLE_VEH; i++)
{
if(!vInfo[ivCreated[i]][vPrice]) return i;
}
return 255;
}