Try this out. It runs EngFunc_FindEntityInSphere on where you aim, and return's the ent's id if found.
PHP Code:
stock get_aim_radius(index, Float:radius)
{
static Float:start[3], Float:view_ofs[3]
pev(index, pev_origin, start)
pev(index, pev_view_ofs, view_ofs)
xs_vec_add(start, view_ofs, start)
static Float:dest[3]
pev(index, pev_v_angle, dest)
engfunc(EngFunc_MakeVectors, dest)
global_get(glb_v_forward, dest)
xs_vec_mul_scalar(dest, 9999.0, dest)
xs_vec_add(start, dest, dest)
engfunc(EngFunc_TraceLine, start, dest, 0, index, 0)
static Float:origin[3]
get_tr2(0, TR_vecEndPos, origin)
new ent = -1
while((ent = engfunc(EngFunc_FindEntityInSphere, ent, origin, radius)) != 0)
return ent
return 0
}
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.