XY-problem will only make your plugin bad.
This works fine for me. I tried it by running beampoints along the Z-axis and both of them hit the red cross on de_dust.
Code:
#include <amxmodx>
#include <engine>
public plugin_init() {
register_plugin("", "", "");
new Float:locations[2][3]
find_bomb_targets(locations);
server_print("Location 1: %d, %d, %d", floatround(locations[0][0]), floatround(locations[0][1]), floatround(locations[0][2]));
server_print("Location 2: %d, %d, %d", floatround(locations[1][0]), floatround(locations[1][1]), floatround(locations[1][2]));
}
stock find_bomb_targets(Float:locations[2][3]) {
new ent, i;
while ( i < 2 && (ent = find_ent_by_class(ent,"func_bomb_target") ) ) {
get_brush_entity_origin(ent, locations[i]);
i++;
}
}
Code:
Location 1: 1952, 608, 80
Location 2: 352, -1656, 128
__________________