Solution.
PHP Code:
//#CLIENTSIDE
function GraalControl.onKeyDown(temp.keycode, temp.keystring, temp.scancode) {
if (keycode != 1073) // ALT + 1
return;
// Limit size to level size or screen res
temp.pixel_width = (player.level.width > screenwidth / 16) ? screenwidth : player.level.width * 16;
temp.pixel_height = (player.level.height > screenheight / 16) ? screenheight : player.level.height * 16;
// Get coordinates for screenshot
temp.level_x = player.level.width / 2 - pixel_width / 32;
temp.level_y = player.level.height / 2 - pixel_height / 32;
makescreenshot2("screenshot" @ int(random(100000,1000000)) @ ".png",
0x3f, // include everything
level_x,
level_y,
player.z,
pixel_width,
pixel_height);
}