Advertisement
BobTheHunted

Screenshot.sqf

Jan 25th, 2022
759
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // For use with PennyWorth's screenshot extension https://github.com/pennyworth12345/pen_screenshot
  2.  
  3. private ["_debug", "_wm", "_cm", "_pos", "_dir", "_posString", "_timeString", "_screenshot", "_path"];
  4.  
  5. _debug = false;
  6.  
  7. _wm  = worldName;
  8. _cm  = get3DENCamera;
  9. _pos = [round ((getPosASL _cm) select 0), round ((getPosASL _cm) select 1), round ((getPosASL _cm) select 2)];
  10. _dir = "C:\Arma3\Captures";
  11.  
  12. _posString  = format ["%1x-%2y-%3z", _pos select 0, _pos select 1, _pos select 2];
  13. _timeString = format ["%1h-%2m", date select 3, date select 4];
  14. _screenshot = format ["%1\%2_%3_%4_capture.png", _dir, _wm, _posString, _timeString];
  15.  
  16. _path = format ["capture:%1", _screenshot];
  17.  
  18. (findDisplay 316000) closeDisplay 316000;
  19. sleep 0.1;
  20.  
  21. "pen_screenshot" callExtension _path;
  22.  
  23. if (_debug) then {systemChat ("Captured " + str _screenshot)};
  24.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement