+void LocalCommand_create_scrshot_ent(float request)
+{
+ switch(request)
+ {
+ case CMD_REQUEST_COMMAND:
+ {
+ float fh;
+ string filename = strcat(MapInfo_Map_bspname, "_scrshot_ent.txt");
+ fh = fopen(filename, FILE_WRITE);
+
+ if(fh >= 0)
+ {
+ fputs(fh, "{\n");
+ fputs(fh, strcat("\"classname\" \"info_autoscreenshot\"\n"));
+ fputs(fh, strcat("\"origin\" \"", strcat(ftos(view_origin_x), " ", ftos(view_origin_y), " ", ftos(view_origin_z)), "\"\n"));
+ fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles_x), " ", ftos(view_angles_y), " ", ftos(view_angles_z)), "\"\n"));
+ fputs(fh, "}\n");
+
+ print("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
+
+ fclose(fh);
+ }
+ else
+ {
+ print("^1Error: ^7Could not dump to file!\n");
+ }
+ return;
+ }
+
+ default:
+ case CMD_REQUEST_USAGE:
+ {
+ print("\nUsage:^3 cl_cmd create_scrshot_ent\n");
+ print(" No arguments required.\n");
+ return;
+ }
+ }
+}
+