There are stock...
PHP Code:
fm_find_sphere_class(id, "player", 200.0, iEnts, 1)
PHP Code:
stock fm_find_sphere_class(aroundent, const _lookforclassname[], Float:radius, entlist[], maxents, const Float:_origin[3])
{
static Float:origin[3]
if(!pev_valid(aroundent))
{
origin[0] = _origin[0]
origin[1] = _origin[1]
origin[2] = _origin[2]
}
else
pev(aroundent, pev_origin, origin)
new ent = 0, foundents = 0
while((ent = engfunc(EngFunc_FindEntityInSphere, aroundent, origin, radius)) != 0)
{
if(!pev_valid(ent))
continue;
if(foundents >= maxents)
break;
static classname[32]
pev(ent, pev_classname, classname, 31)
if(equal(classname, _lookforclassname))
entlist[foundents++] = ent
}
return foundents;
}