Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // fn_dev_consoleDebugConsole.sqf
- // Thanks to killzonekid.com
- // for the debug_console extension
- private ["_text","_color","_time","_inFile","_colorEnding","_prefix","_asynch"];
- params [
- ["_text","C"],
- ["_color","WHITE"],
- ["_time",1],
- ["_inFile",1],
- ["_asynch",1],
- ["_prefix","BPC"]
- ];
- // Exit if not in debug mode
- if(BPC_DEBUG_MODE == 0) exitWith {"0"};
- _colorEnding = switch (_color) do
- {
- case "WHITE":
- {
- "111"
- };
- case "RED":
- {
- "100"
- };
- case "GREEN":
- {
- "010"
- };
- case "BLUE":
- {
- "001"
- };
- case "YELLOW":
- {
- "110"
- };
- case "PURPLE":
- {
- "101"
- };
- case "CYAN":
- {
- "011"
- };
- default
- {
- "111"
- };
- };
- if(_time != 0 and _time != 1) then
- {
- _time = 1;
- };
- if(not (_text isEqualTo "C")) then
- {
- _text = format ["%4:%3#%1%2", _colorEnding, _time, _text,_prefix];
- };
- if(_asynch == 1 or (not (_text isEqualTo "C")))then{
- _text spawn
- {
- "debug_console" callExtension (_this);
- };
- }else{
- _text call
- {
- "debug_console" callExtension (_this);
- };
- };
Add Comment
Please, Sign In to add comment