Code:
new entitiesList[12];
new entitiesCount;
entitiesCount = find_sphere_class(0, "func_bomb_target", 4096.0, entitiesList, sizeof entitiesList);
entitiesCount += find_sphere_class(0, "info_bomb_target", 4096.0, entitiesList[entitiesCount], sizeof entitiesList - entitiesCount);
new Array:targetsList = ArrayCreate();
for (new i, target; i < entitiesCount; ++i)
{
target = pev(entitiesList[i], pev_target);
ArrayFindValue(targetsList, target) == -1 && ArrayPushCell(targetsList, target);
}
new bombSitesCount = ArraySize(targetsList);
ArrayDestroy(targetsList);
log_amx("Bomb site count = %d", bombSitesCount);
Code:
[test.amxx] Bomb site count = 2
This is actually kinda dumb to do that, because well, most of time you have always only 2 bomb sites.
You will have to explain what you want to do exactly. It would make more sense, for example, to store each zone origin and associating each zone with a bomb site number (generally you have only 2 bomb site, but it can be more).
__________________