diff --git a/vmf_source/scripts/mods/vmf/modules/dev_console.lua b/vmf_source/scripts/mods/vmf/modules/dev_console.lua index 1e68a9a..ae00550 100644 --- a/vmf_source/scripts/mods/vmf/modules/dev_console.lua +++ b/vmf_source/scripts/mods/vmf/modules/dev_console.lua @@ -1,21 +1,22 @@ DEV_CONSOLE_ENABLED = DEV_CONSOLE_ENABLED or false -local print_original_function = print - -local print_hook_function = function(func, ...) - if DEV_CONSOLE_ENABLED then - CommandWindow.print(...) - func(...) - else - func(...) - end -end - -print = function(...) - print_hook_function(print_original_function, ...) -end - if DEV_CONSOLE_ENABLED == false then + + local print_original_function = print + + local print_hook_function = function(func, ...) + if DEV_CONSOLE_ENABLED then + CommandWindow.print(...) + func(...) + else + func(...) + end + end + + print = function(...) + print_hook_function(print_original_function, ...) + end + CommandWindow.open("Developer console") DEV_CONSOLE_ENABLED = true end \ No newline at end of file