Hi all,
I have been trying to fix this issue myself but unfortunately after about 30 restarts I give up -at least for a while!-. I wonder if any of the script gurus can take a look and fix this for me?
Here is the story:
I had a custom debug monitor which worked fine. Let's call it "version 1"... Since I'm very now to all this, I just downloaded a working code from the forums, customized it by investing several hours, eventually it displayed exactly what I wanted. However in that version was missing two features...
#1: It was not toggleable. it simply stayed on, all the time, I assume some people won't like it, so I wanted improve this behaviour...
#2: In my initial seach, I saw that some scripts displaying player's vehicle picture (or weapon picture if player is not in vehicle), and I thought it was a nice addon - wanted to have the same.
So keeping an open eye on such scripts, tonight on another forum I found a new code which fixes the issues above however this new one (version 2) broke one feature I loved (the "Restart in N minutes" countdown).
In the light of the above summary, my help request is, could any gurus please take a look and tell me how to make the restart counter in version 2 work?
I am copying below both versions but as you can imagine simply copy & paste of restart counter from version 1 to version 2 did not work....
Thanks in advance!
VERSION 2 (I like this one better but the restart counter not working)
// Taken from the 2nd post here: http://opendayz.net/threads/simple-ish-debug-monitor-w-toggling-function-and-animation.12567/ // Modified as per our previous template // File: <mission_dir>\custom\custom_monitor.sqf // Summary: This file is called by <mission_dir>\init.sqf with the code below ////// if (!isDedicated) then { ////// // call custom debug monitor ////// [] execVM "custom\custom_monitor.sqf"; dayz_spaceInterrupt = { private ["_dikCode", "_handled"]; _dikCode = _this select 1; _handled = false; if (_dikCode == 0x44) then { if (debugMonitor) then { debugMonitor = false; hintSilent ""; } else {[] spawn fnc_debug;}; }; _handled }; fnc_debug = { debugMonitor = true; while {debugMonitor} do { _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"; _banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits; _heroCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits; _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); if (player == vehicle player) then { _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture')); } else { _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); }; hintSilent parseText format [" <t size='1.25' font='Bitstream'align='center' color='#D60000'>Epoch Test Server</t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='1.15 'font='Bitstream' align='right'>%1</t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='1.15' font='Bitstream'align='center' color='#298A08'>%2</t><br/> <t size='0.95' font='Bitstream'align='center' color='#5882FA'>Survived %3 Days</t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.75' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/> <t size='0.75' font='Bitstream' align='left' color='#FFBF00'>Headshots: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/> <t size='0.75' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/> <t size='0.75' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='0.95' font='Bitstream' align='right'>%7</t><br/> <t size='0.75' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%8</t><br/> <t size='0.75' font='Bitstream' align='left' color='#FF0000'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%9</t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.75'font='Bitstream'align='left' color='#104E8B' >Current Hero Count:</t><t size='1'font='Bitstream'align='right' color='#104E8B' >%10</t><br/> <t size='0.75'font='Bitstream'align='left' color='#104E8B' >Current Bandit Count:</t><t size='1'font='Bitstream'align='right' color='#104E8B' >%11</t><br/> <t size='0.75' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='0.95' font='Bitstream' align='right'>%12</t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.75' font='Bitstream'align='center' color='#D60000'>www.mydomain.com</t><br/> <t size='0.75' font='Bitstream'align='center' color='#D60000'>ts.mydomain.com</t><br/> <t size='0.35' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='1'font='Bitstream'align='center' color='#104E8B'>Press F10 to toggle!</t><br/> <img size='3' image='%13'></img><br/>", count playableUnits,dayz_playerName,(dayz_Survived),_kills,_headShots,_killsH,_killsB,round _humanity,r_player_blood,_heroCount,_banditCount,(round diag_fps),_pic]; sleep 1; }; }; [] spawn fnc_debug;
VERSION 1 (restart counter working fine - but it doesn't show pic or is not toggleable so I want to leave this behind!)
// File: <mission_dir>\custom\custom_monitor.sqf // Summary: This file is called by <mission_dir>\init.sqf with the code below ////// if (!isDedicated) then { ////// // call custom debug monitor ////// [] execVM "custom\custom_monitor.sqf"; 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]; _headShots = player getVariable["headShots",0]; hintSilent parseText format [" <t size='1.25' font='Bitstream'align='center' color='#D60000'>Epoch Test Server</t><br/> <t size='1.15' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='1.15 'font='Bitstream' align='right'>%1</t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='1.15' font='Bitstream'align='center' color='#298A08'>%2</t><br/> <t size='1.15' font='Bitstream'align='center' color='#5882FA'>Survived %3 Days</t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Headshots: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='0.95' font='Bitstream' align='right'>%7</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%8</t><br/> <t size='0.95' font='Bitstream' align='left' color='#FF0000'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%9</t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='0.95' font='Bitstream' align='right'>%10</t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='1.15' font='Bitstream'align='center' color='#5882FA'>Restart in %11 Minutes</t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'></t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'>www.mydomain.com</t><br/> <t size='0.95' font='Bitstream'align='center' color='#D60000'>ts.mydomain.com</t><br/>", (count playableUnits),dayz_playerName,(dayz_Survived),_kills,_headShots,_killsH,_killsB,round _humanity,r_player_blood,(round diag_fps),(round(180-(serverTime) / 60)) ]; sleep 1; };