Crankyfist Posted May 24, 2014 Report Share Posted May 24, 2014 What code can I add to debug the monitor code i have here? Any help would be greatly appreciated. waitUntil {alive player}; while {true} do { _kills = player getVariable["zombieKills",0]; _killsH = player getVariable["humanKills",0]; _killsB = player getVariable["banditKills",0]; _humanity = player getVariable["humanity",0]; hintSilent parseText format [" <t size='1.25' font='Bitstream'align='center' color='#D60000'>Zombies Gone Wild</t><br/> <t size='1.15' font='Bitstream'align='center' color='#D60000'>www.zombiesgonewild.org</t><br/> <t size='1.15' font='Bitstream'align='center' color='#5882FA'>Survived %2 Days</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='0.95 'font='Bitstream' align='right'>%3</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%7</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%8</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='0.95' font='Bitstream' align='right'>%9</t><br/> <t size='1.15' font='Bitstream'align='center' color='#5882FA'>Restart in %10 Minutes</t><br/>", dayz_playerName,(dayz_Survived),(count playableUnits),_killsH,_killsB,_kills,round _humanity,r_player_blood,(round diag_fps),(round(180-(serverTime) / 60)) ]; sleep 1; }; Link to comment Share on other sites More sharing options...
0 Triage Posted May 24, 2014 Report Share Posted May 24, 2014 I don't understand what you're asking? Darihon 1 Link to comment Share on other sites More sharing options...
0 Zombiesgonewild1 Posted May 25, 2014 Report Share Posted May 25, 2014 Im trying to figure out. How do I script in to remove my debug menu? Link to comment Share on other sites More sharing options...
0 Crankyfist Posted May 25, 2014 Author Report Share Posted May 25, 2014 ^^^ Link to comment Share on other sites More sharing options...
0 Dumgard Posted May 25, 2014 Report Share Posted May 25, 2014 A key to press to toggle your Debug Monitor? I haven't successfully been able to get it working in Epoch, because every time I have tried to use a keybind, it breaks the game. Specifically, I get an issue where you can't stop buying through traders. Link to comment Share on other sites More sharing options...
0 SadBoy1981 Posted May 25, 2014 Report Share Posted May 25, 2014 What code can I add to debug the monitor code i have here? Any help would be greatly appreciated. waitUntil {alive player}; while {true} do { _kills = player getVariable["zombieKills",0]; _killsH = player getVariable["humanKills",0]; _killsB = player getVariable["banditKills",0]; _humanity = player getVariable["humanity",0]; hintSilent parseText format [" <t size='1.25' font='Bitstream'align='center' color='#D60000'>Zombies Gone Wild</t><br/> <t size='1.15' font='Bitstream'align='center' color='#D60000'>www.zombiesgonewild.org</t><br/> <t size='1.15' font='Bitstream'align='center' color='#5882FA'>Survived %2 Days</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='0.95 'font='Bitstream' align='right'>%3</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%7</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%8</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='0.95' font='Bitstream' align='right'>%9</t><br/> <t size='1.15' font='Bitstream'align='center' color='#5882FA'>Restart in %10 Minutes</t><br/>", dayz_playerName,(dayz_Survived),(count playableUnits),_killsH,_killsB,_kills,round _humanity,r_player_blood,(round diag_fps),(round(180-(serverTime) / 60)) ]; sleep 1; }; My debug monitor works fine and closing with F8, first click make it smaller, second one close it . In the end of your init.sqf paste this one: //HotKey(F8) waituntil {!IsNull (findDisplay 46)}; _SpecKeyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", loadFile "hotkeys.sqf"]; //Debug Monitor [] execVM "custom_monitor.sqf"; Next make file custom_monitor.sqf same place where is init.sqf and paste inside: custom_monitor_state = 0; fnc_debug = { j0k3r5_stats = true; while {j0k3r5_stats} do { _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750]; _textCity = "Wilderness"; if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)}; if (player == vehicle player) then { _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture')); } else { _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); }; _timeleft= _combattimeout-time; _kills = player getVariable["zombieKills",0]; _killsH = player getVariable["humanKills",0]; _killsB = player getVariable["banditKills",0]; _humanity = player getVariable["humanity",0]; _headShots = player getVariable["headShots",0]; _zombies = count entities "zZombie_Base"; _zombiesA = {alive _x} count entities "zZombie_Base"; _text = switch(custom_monitor_state) do { case 0:{ " <img size='5' image='%10'/> <t color='#7D8D70' size='1' font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#7D8D70'>%11</t><br/> <t color='#708D72' size='1' font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#708D72'>%1</t><br/> <t color='#708D70' size='1' font='Bitstream'align='left'>Humanity:</t><t size='1' font='Bitstream'align='right'color='#708D70'>%2</t><br/> <t color='#708B8D' size='1' font='Bitstream'align='left'>Head:</t><t size='1' font='Bitstream'align='right'color='#708B8D'>%6</t><br/> <br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Players Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%3</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%4</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Zombie Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%5</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Vehicles:</t><t size='0.95' font='Bitstream'align='right'color='#707D8D'>%16</t><br/> <t color='#72708D' size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#72708D'>%14</t><br/> <t color='#80708D' size='1' font='Bitstream'align='left'>Players Online: </t><t size='1' font='Bitstream'align='right'color='#80708D'>%15</t><br/> <t size='1' font='Bitstream'align='center'color='#8D708B'>Server run %18h %8m</t><br/> <img size='6' image='%9'/> " }; case 1:{ " <t color='#708D72' size='1' font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#708D72'>%1</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%4</t><br/> <t color='#72708D' size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#72708D'>%14</t><br/> <t color='#80708D' size='1' font='Bitstream'align='left'>Players Online: </t><t size='1' font='Bitstream'align='right'color='#80708D'>%15</t><br/> <t size='1' font='Bitstream'align='center'color='#8D708B'>Server run %18h %8m</t><br/> " }; case 2:{ "" }; }; if(((getPlayerUID player) in ["xxxx","xxxxx"]) and custom_monitor_state == 1 ) then { // Replace xxx to admins UID _position = getPos player; _px = _position select 0;//X _py = _position select 1;//Y _text = _text + format ["<t color='#00bcbc' size='0.8'font='Bitstream'align='left'>x:%1 y:%2</t><br/>",_px,_py]; }; hintSilent parseText format [ _text, r_player_blood, //1 round _humanity, //2 _killsH, //3 _killsB, //4 _kills, //5 _headShots, //6 (dayz_Survived), //7 ((floor(serverTime/60)) mod 60), //8 _pic, //9 _logo, //10 _textCity, //11 0, //12 0, //13 round diag_fps, //14 {side _x == west} count allUnits, //15 (count([6800, 9200, 0] nearEntities [["StaticWeapon","Car","Motorcycle","Tank","Air","Ship"],25000])),//16 count vehicles, //17 (floor(serverTime/3600)) //18 ]; sleep 1; }; }; [] spawn fnc_debug; Same place make file hotkeys.sqf and paste: if (_this select 1 == 66) then { hintSilent ""; custom_monitor_state = custom_monitor_state + 1; if (custom_monitor_state>2) then { custom_monitor_state = 0; }; }; Must work! Its not my script, i just customize it for my server. Link to comment Share on other sites More sharing options...
0 Guest Posted June 7, 2014 Report Share Posted June 7, 2014 My debug monitor works fine and closing with F8, first click make it smaller, second one close it . In the end of your init.sqf paste this one: //HotKey(F8) waituntil {!IsNull (findDisplay 46)}; _SpecKeyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", loadFile "hotkeys.sqf"]; //Debug Monitor [] execVM "custom_monitor.sqf"; Next make file custom_monitor.sqf same place where is init.sqf and paste inside: custom_monitor_state = 0; fnc_debug = { j0k3r5_stats = true; while {j0k3r5_stats} do { _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750]; _textCity = "Wilderness"; if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)}; if (player == vehicle player) then { _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture')); } else { _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); }; _timeleft= _combattimeout-time; _kills = player getVariable["zombieKills",0]; _killsH = player getVariable["humanKills",0]; _killsB = player getVariable["banditKills",0]; _humanity = player getVariable["humanity",0]; _headShots = player getVariable["headShots",0]; _zombies = count entities "zZombie_Base"; _zombiesA = {alive _x} count entities "zZombie_Base"; _text = switch(custom_monitor_state) do { case 0:{ " <img size='5' image='%10'/> <t color='#7D8D70' size='1' font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#7D8D70'>%11</t><br/> <t color='#708D72' size='1' font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#708D72'>%1</t><br/> <t color='#708D70' size='1' font='Bitstream'align='left'>Humanity:</t><t size='1' font='Bitstream'align='right'color='#708D70'>%2</t><br/> <t color='#708B8D' size='1' font='Bitstream'align='left'>Head:</t><t size='1' font='Bitstream'align='right'color='#708B8D'>%6</t><br/> <br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Players Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%3</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%4</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Zombie Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%5</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Vehicles:</t><t size='0.95' font='Bitstream'align='right'color='#707D8D'>%16</t><br/> <t color='#72708D' size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#72708D'>%14</t><br/> <t color='#80708D' size='1' font='Bitstream'align='left'>Players Online: </t><t size='1' font='Bitstream'align='right'color='#80708D'>%15</t><br/> <t size='1' font='Bitstream'align='center'color='#8D708B'>Server run %18h %8m</t><br/> <img size='6' image='%9'/> " }; case 1:{ " <t color='#708D72' size='1' font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#708D72'>%1</t><br/> <t color='#707D8D' size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%4</t><br/> <t color='#72708D' size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#72708D'>%14</t><br/> <t color='#80708D' size='1' font='Bitstream'align='left'>Players Online: </t><t size='1' font='Bitstream'align='right'color='#80708D'>%15</t><br/> <t size='1' font='Bitstream'align='center'color='#8D708B'>Server run %18h %8m</t><br/> " }; case 2:{ "" }; }; if(((getPlayerUID player) in ["xxxx","xxxxx"]) and custom_monitor_state == 1 ) then { // Replace xxx to admins UID _position = getPos player; _px = _position select 0;//X _py = _position select 1;//Y _text = _text + format ["<t color='#00bcbc' size='0.8'font='Bitstream'align='left'>x:%1 y:%2</t><br/>",_px,_py]; }; hintSilent parseText format [ _text, r_player_blood, //1 round _humanity, //2 _killsH, //3 _killsB, //4 _kills, //5 _headShots, //6 (dayz_Survived), //7 ((floor(serverTime/60)) mod 60), //8 _pic, //9 _logo, //10 _textCity, //11 0, //12 0, //13 round diag_fps, //14 {side _x == west} count allUnits, //15 (count([6800, 9200, 0] nearEntities [["StaticWeapon","Car","Motorcycle","Tank","Air","Ship"],25000])),//16 count vehicles, //17 (floor(serverTime/3600)) //18 ]; sleep 1; }; }; [] spawn fnc_debug; Same place make file hotkeys.sqf and paste: if (_this select 1 == 66) then { hintSilent ""; custom_monitor_state = custom_monitor_state + 1; if (custom_monitor_state>2) then { custom_monitor_state = 0; }; }; Must work! Its not my script, i just customize it for my server. hotkeys.sqf not found would i just add [] execVM "hotkeys.sqf"; in init.sqf file at bottom same place as other ? Link to comment Share on other sites More sharing options...
0 SadBoy1981 Posted June 7, 2014 Report Share Posted June 7, 2014 //HotKey(F8) waituntil {!IsNull (findDisplay 46)}; _SpecKeyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", loadFile "hotkeys.sqf"]; //Debug Monitor [] execVM "custom_monitor.sqf"; Must add it somwhere inside init.sqf after line if (!isDedicated) then { Link to comment Share on other sites More sharing options...
Question
Crankyfist
What code can I add to debug the monitor code i have here? Any help would be greatly appreciated.
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now