Guest User

Untitled

a guest
Feb 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. // fn_dev_consoleDebugConsole.sqf
  2. // Thanks to killzonekid.com
  3. // for the debug_console extension
  4. private ["_text","_color","_time","_inFile","_colorEnding","_prefix","_asynch"];
  5. params [
  6. ["_text","C"],
  7. ["_color","WHITE"],
  8. ["_time",1],
  9. ["_inFile",1],
  10. ["_asynch",1],
  11. ["_prefix","BPC"]
  12. ];
  13. // Exit if not in debug mode
  14. if(BPC_DEBUG_MODE == 0) exitWith {"0"};
  15. _colorEnding = switch (_color) do
  16. {
  17. case "WHITE":
  18. {
  19. "111"
  20. };
  21. case "RED":
  22. {
  23. "100"
  24. };
  25. case "GREEN":
  26. {
  27. "010"
  28. };
  29. case "BLUE":
  30. {
  31. "001"
  32. };
  33. case "YELLOW":
  34. {
  35. "110"
  36. };
  37. case "PURPLE":
  38. {
  39. "101"
  40. };
  41. case "CYAN":
  42. {
  43. "011"
  44. };
  45. default
  46. {
  47. "111"
  48. };
  49. };
  50. if(_time != 0 and _time != 1) then
  51. {
  52. _time = 1;
  53. };
  54. if(not (_text isEqualTo "C")) then
  55. {
  56. _text = format ["%4:%3#%1%2", _colorEnding, _time, _text,_prefix];
  57. };
  58.  
  59. if(_asynch == 1 or (not (_text isEqualTo "C")))then{
  60. _text spawn
  61. {
  62. "debug_console" callExtension (_this);
  63. };
  64. }else{
  65. _text call
  66. {
  67. "debug_console" callExtension (_this);
  68. };
  69. };
Add Comment
Please, Sign In to add comment