Boo, I like to do it oldskool
Code:
#define MAX_DISTANCE 900
public my_func(id)
{
new ent;
while((ent = find_ent_by_class(ent, "func_door")) != 0)
{
new distance = floatround(entity_range(id, ent));
if(distance <= MAX_DISTANCE)
{
client_print(id, 3, "Entity %i is within the max distance", ent);
}
}
}
__________________