- vector match = stov(argv(1));
- FOREACH_ENTITY_ORDERED(it.origin == match, LOG_INFOF("%i (%s)", it, it.classname));
+ vector org = stov(argv(1));
+ float dist = stof(argv(2));
+ int entcnt = 0;
+ FOREACH_ENTITY_ORDERED(true,
+ {
+ if (dist > 0)
+ {
+ if (!vdist(it.origin - org, <, dist))
+ continue;
+ }
+ else if (it.origin != org)
+ continue;
+ LOG_HELPF("%i (%s)", it, it.classname);
+ ++entcnt;
+ });
+ if(entcnt)
+ LOG_HELPF("Found %d entities", entcnt);