+
+GENERIC_COMMAND(find, "Search through entities for matching classname")
+{
+ switch (request)
+ {
+ case CMD_REQUEST_COMMAND:
+ {
+ FOREACH_ENTITY_CLASS_ORDERED(argv(1), true, LOG_INFOF("%i (%s)\n", it, it.classname));
+ return;
+ }
+
+ default:
+ {
+ LOG_INFO("Incorrect parameters for ^2find^7\n");
+ }
+ case CMD_REQUEST_USAGE:
+ {
+ LOG_INFO("\nUsage:^3 " GetProgramCommandPrefix() " find classname\n");
+ LOG_INFO(" Where 'classname' is the classname to search for.\n");
+ return;
+ }
+ }
+}
+
+GENERIC_COMMAND(findat, "Search through entities for matching origin")
+{
+ switch (request)
+ {
+ case CMD_REQUEST_COMMAND:
+ {
+ vector match = stov(argv(1));
+ FOREACH_ENTITY_ORDERED(it.origin == match, LOG_INFOF("%i (%s)\n", it, it.classname));
+ return;
+ }
+
+ default:
+ LOG_INFO("Incorrect parameters for ^2findat^7\n");
+ case CMD_REQUEST_USAGE:
+ {
+ LOG_INFO("\nUsage:^3 " GetProgramCommandPrefix() " findat \"0 0 0\"\n");
+ return;
+ }
+ }
+}