Something like this?
Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "func_breakable count"
#define AUTHOR "Alucard"
#define VERSION "1.0"
#define MAX_ENTS 1380
new gMaxEntities, gTotal;
new array[MAX_ENTS];
new const Entity[] = "func_breakable";
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
gMaxEntities = global_get(glb_maxEntities);
static szClass[32];
for(new i = 1; i < g_MaxEntities; ++i)
{
if(!pev_valid(i) ) continue;
pev(i, pev_classname, szClass, 31);
if(!equal(szClass, Entity) ) continue;
gTotal++;
}
}
and then, you have array[gTotal] or if you use a loop:
Code:
for(new i = 0; i < gTotal; i++)
{
something = array[i];
}
Another method is using dynamic arrays.
__________________